Fix for WordPress SEO (by Yoast) bbPress breadcrumbs issue

Fix for WordPress SEO (by Yoast) bbPress breadcrumbs issue

By default wordpree-seo plugin disable bbPress default breadcrumbs.

When i open any topic page, I expected the plugin to do this:

Home > Forums > Parent Forum > Child Forum >Topic

Instead it did this:

Home > Topics > Child Forum > Topic

It gives “Topics” instead of “Forums” and drops the “Parent Forum” if “Parent Forum” is present

Following code snippet will enable bbPress default breadcrumbs and remove wordpress-seo plugin filter.

/**
 * 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;
}


1 thought on “Fix for WordPress SEO (by Yoast) bbPress breadcrumbs issue”

Leave a Reply

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