Skip to:
Content
Pages
Categories
Search
Top
Bottom

Changing breadcrumbs from "topics" to "forums"

  • @mattvr

    Participant

    Hello everyone,

    I’d like to know how to change the breadcrumbs on my bbPress installation. On the topics pages, the breadcrumb is something like this:

    Home / Topics / *Forum Name* / *Topic Title*

    Is there a for it to be like:

    Home / Forum Index / *Forum Name* / *Topic Title*

Viewing 7 replies - 1 through 7 (of 7 total)
  • @robin-w

    Moderator

    is this just a name change?

    if so, add this to your functions file

    add_filter( 'bbp_get_breadcrumb', 'change_breadcrumb_text' );
    
    Function change_breadcrumb_text ($trail) {
    $trail = str_replace ('Topics','Forum Index',$trail) ;
    return $trail ;
    }

    @mattvr

    Participant

    Hi @robin-w

    Thanks for responding, but it’s not really a name change. Kindly see this link
    the breadcrumbs for that is Home | Topics | News & Announcements | Welcome to Nurseslabs and our forums! how come it points to Topics rather than the forum’s homepage?

    @robin-w

    Moderator

    hmmm… something is changing that

    It could be a theme or plugin issue

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.

    Then come back

    @robkk

    Moderator

    common issue with yoast breadcrumbs.

    /**
     * Filter to call default bbPress breadcrumbs
     */
    add_filter( 'bbp_get_breadcrumb', 'myfix_bbp_get_breadcrumb', 1, 3 );
    function myfix_bbp_get_breadcrumb($trail, $crumbs, $r){
            // This will remove wordpress-seo filter to disable bbPress breadcrums by default
            remove_all_filters("bbp_get_breadcrumb",10);
            return $trail;
    }

    use this to enable bbPress breadcrumbs

    @mattvr

    Participant

    @robin-w I did deactivate the plugins and found out it was Yoast’s breadcrumbs causing this.


    @Robkk
    apologies but where would I put this code? Sorry, I’m a bit new to coding. Found it!

    Thanks for all your help.

    @1kan5

    Participant

    Hello

    i have the same problem, i don’t understand what you do, please help me.

    where is the functions file ?

    what is the code that you modify ?

    @robkk

    Moderator

    its in your child theme if you created one. you can also just use the functionality plugin too.

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