bbPress uses pipe | character in various places as a separator between links or buttons or other elements. But, sometimes, these elements can cause problems with the layouts and need to be changed or removed.

This will focus on several cases where pipe is used as a separator, and in all cases, we will remove the separator, but you can use any value instead.

Topic Admin Links

This is used to display list of actions for each topic that only admin or moderator can use. The filter we need for this is: bbp_after_get_topic_admin_links_parse_args and it is used inside the function bbp_get_topic_admin_links(). Here is the example:

add_filter('bbp_after_get_topic_admin_links_parse_args', 'bbhelp_club_get_topic_admin_links_args');
function bbhelp_club_get_topic_admin_links_args($args) {
  $args['sep'] = '';

  return $args;
}

Reply Admin Links

This is used to display list of actions for each reply that only admin or moderator can use. The filter we need for this is: bbp_after_get_reply_admin_links_parse_args and it is used inside the function bbp_get_topic_admin_links(). Here is the example:

add_filter('bbp_after_get_reply_admin_links_parse_args', 'bbhelp_club_get_reply_admin_links_args');
function bbhelp_club_get_reply_admin_links_args($args) {
  $args['sep'] = '';

  return $args;
}

 

Please, take a few seconds and rate this answer
No votes yet.
Please wait...

Question answered by

Milan Petrovic

Programmer since the age of 12 and now WordPress developer with more than 8 years of WordPress experience, author of more than 100 plugins and more than 20 themes.

SiteGround - Managed WordPress Hosting

The Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

WP Rocket - Make WordPress Load Fast in a Few Clicks