Breadcrumbs

#52004
  • Resolved Simon Womersley
    Rank Math free

    Hello,
    I uninstalled Yoast yesterday and I’ve installed Rank Math. I noticed my breadcrumbs disappeared on my site… Makes sense as they were a Yoast widget. I’ve read the Rank Math tutorial and I’ve added them back in.

    It’s 90% working. For example, if you go on ppc service page the breadcrumbs will rightfully show home >> services >> ppc. Great!
    However, my blog breadcrumbs aren’t correct. It’s showing home >> category >> name of post. Whereas Yoast had it as home >> blog >> category >> name of post. My question is How do i add blog back into the breadcrumbs?

    My workaround is adding a new category called ‘blog’ and then editing my current categories so they are the child of the blog. Then going back into each post and ticking ‘Blog’ for the category (as well as the original category i want it to be in). Seems an extra step. Plus i don’t like how the blog now lives in a category named blog within another category. will that impact SEO?

    How do i get the breadcrumbs to display ‘blog’ (the name of the page’ without having to create and add them to a category called ‘blog’?

    • This topic was modified 4 years, 6 months ago by Simon Womersley. Reason: there is no show blog breadcrumb option as you suggest. ive added 4 screenshots. where is it please?
Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    You can easily fix this by heading over to Rank Math > General Settings > Breadcrumbs > Show Blog Page and enable this button as shown below:
    Screenshot

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hi, please see above screenshots – i cannot find ‘show blog page’

    Many thanks

    Simon

    Alberto
    Rank Math business

    Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    You can also achieve it using custom code and Rank Math filters. I have created the code for you (you just need to check it and customize it), to use it just add it at the end of the functions.php file in your active theme:

    /**
     * Allow changing or removing the Breadcrumb items
     *
     * @param array       $crumbs The crumbs array.
     * @param Breadcrumbs $this   Current breadcrumb object.
     */
    
    add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) {
    	if(is_singular('post')||is_category()){
    		array_splice( $crumbs, 1, 0, array(array(
    			"Blog",
    			"https://yourwebsite.com/blog/",
    			"hide_in_schema" => false
    		)) );
            }
    	return $crumbs;
    }, 10, 2);

    Looking forward to helping you. Thank you.

    thank you ever so much for the code, it works. When this button comes back in the next update I’ll delete the code.

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this ticket.