Skip to:
Content
Pages
Categories
Search
Top
Bottom

how do I remove first two parts of breadcrumb?


  • boto10
    Participant

    @boto10

    Hi again.
    Does anyone know which file to edit the breadcrumb so that I could remove the firest two parts showing in thsi screenshot http://i.imgur.com/b1Mee.jpg ?
    Reason I want it out is because the link home goes to my index php which is just my option to remove but the forum link it links to the main forum page that I cannot add widgets or modules into. Its shows the complete wide view and no modules could be put (too empty).
    Can someone guide me?

    Thanks

Viewing 18 replies - 1 through 18 (of 18 total)
  • 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


    boto10
    Participant

    @boto10

    Many thanks. I just copies the whole thing and paste it then wallah. Getting to like WordPress even more.
    Thanks.


    hongthai2791nd
    Participant

    @hongthai2791nd

    Thank moderator,I also have the same problem
    and has been resolved


    ps3hero
    Participant

    @ps3hero

    awesome! THX Stephen!


    benjito
    Participant

    @halydris

    Also works around my issue with Customizr theme, thanks!


    AntonyC
    Participant

    @antonyc

    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


    Lalit_patadiya
    Participant

    @lalit_patadiya

    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


    Jens
    Participant

    @jesus-1

    @netweb Thanks a lot! Your filter still works like a charm.


    thwright
    Participant

    @thwright

    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?


    thwright
    Participant

    @thwright

    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.


    rcoyle56
    Participant

    @rcoyle56

    @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.


    Robin W
    Moderator

    @robin-w

    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


    rcoyle56
    Participant

    @rcoyle56

    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?


    rcoyle56
    Participant

    @rcoyle56

    @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.


    Robin W
    Moderator

    @robin-w

    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.


    telium
    Participant

    @telium

    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?


    Robin W
    Moderator

    @robin-w

    no idea on the code – style pack still works

Viewing 18 replies - 1 through 18 (of 18 total)
  • You must be logged in to reply to this topic.
Skip to toolbar