function mycustom_breadcrumb_options() {
// Home - default = true
$args['include_home'] = false;
// Forum root - default = true
$args['include_root'] = false;
// Current - default = true
$args['include_current'] = true;
return $args;
}
add_filter('bbp_before_get_breadcrumb_parse_args', 'mycustom_breadcrumb_options' );
I think the above will do what you are after… Just add it to your themes functions.php
Many thanks. I just copies the whole thing and paste it then wallah. Getting to like WordPress even more.
Thanks.
Thank moderator,I also have the same problem
and has been resolved
Also works around my issue with Customizr theme, thanks!
Hi, is it possible to replace the forum root (in your above example) with a url of my choice?
Cheers,
Antony
@antonyc You can change the ‘Forum Root’ in bbPress settings
See the docs here for the hows and where https://codex.bbpress.org/forum-settings/#forum-root-slug
Go to \wp-content\plugins\bbpress\includes\common folder and open template.php file and go to line: 2319 and put the condition as bellow
if($r[‘current_text’] == ‘Forums’){
$crumbs[] = $r[‘current_before’] . ‘/put your text here./’ . $r[‘current_after’];
}else{
$crumbs[] = $r[‘current_before’] . $r[‘current_text’] . $r[‘current_after’];
}
try above code it’s work for me
@netweb Thanks a lot! Your filter still works like a charm.
Necro. I am using the Evolve theme, WordPress 4.5.3, and have tried running this code in a child theme, but the effects only take place in the parent theme’s functions.php. I tried a mu-plugin as well. I am thoroughly pleased with the results in the parent theme but would love this in a child. Any thoughts?
Got around this by using this solution and just modified the links to be more to my liking; it is working in a child theme functions.php.
The Forums root, or Forums Index, is going to be the death of me.
@netweb I tried using your code in my site’s function.php, however, the code did not work and in fact caused display errors. I noticed that this post was a few years old. Do you know how the code would be updated to work with current bbpress? I need to remove the Home breadcrumb specifically. The forum and topic breadcrumbs are fine.
my style pack plugin lets you amend breadcrumbs, including not showing the home breadcrumb.
bbp style pack
after activation go to
dashboard>settings>bbp style pack>breadcrumbs
Thank you so much for the plug-in. Definitely helps in removing the home plug-in. Will this plug-in, also, allow me to replace the Home in the breadcrumbs with a post that the forum is attached to?
@robin-w I clicked the box for disabling the home breadcrumb, and the home breadcrumb still appears using the plug-in. The plug-in allowed me to disable all breadcrumbs, but it’s not allowing me to remove the individual home, root, or current breadcrumbs.
could be various reasons why this is happening – you have also posted in my style pack support forum, so I’ll pick it up there.
Does the above code still work?
I tried to paste into my functions.php and don’t see any difference in breadcrumbs.
Jan 2020 – perhaps bbpress or wp code has changed?
no idea on the code – style pack still works