Breadcrumbs

#472013
  • Resolved Greer
    Rank Math free

    Hi,
    Recently, I moved from Yoast to Rank Math. So far I am loving it thank you!
    I am trying to add Breadcumbs to my posts (they were on the site originally but have since gone). I have managed to add them via the theme builder for the blog posts only. I am happy with that. I would like to had the link ‘Blog’ in the breadcrumb opposed to the category. Is this an option? I am sure there is something I am missing here. The urls are set to
    domainname.com/blog-post-name
    But I would like the breadcrumbs to be
    Home > Website Blog > post-name

    If you could point me into the right direction that would be amazing.
    Thank you
    Greer

Viewing 1 replies (of 1 total)
  • Hello,

    Thanks for contacting us and sorry for any inconvenience that might have been caused due to that.

    You can use the following filter to replace the category with Blog page in the breadcrumbs:

    add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) {
    	$crumbs[1][0] = 'Blog';
            $crumbs[1][1] = 'Your Blog URL'; //use the URL of your blog page
    	return $crumbs;
    }, 10, 2);

    Here is how to add a filter to your site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope this helps. Let us know if you need any other assistance.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘Breadcrumbs’ is closed to new replies.