Breadcrumbs not showing blog

#142017
  • Resolved Tania Tyler
    Rank Math free

    My breadcrumbs are not displaying “blog”. I have displayed: home >> post name instead of home >> blog >> post name
    I believe I have all the settings correct, all my other breadcrumbs are working properly. Astra Pro with Elementor Pro. Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Roel John
    Rank Math business

    Hello,

    We fixed it by assigning Categories in Primary Taxonomy in Rank Math > Title & Meta > Post Types > Posts > Primary Taxonomy.
    Taxonomy

    Please see the screenshot below.
    screenshot

    We hope this resolves your issues.

    Thank you.

    Or I guess it would read Crystal Healing & Gemstone Properties instead of blog because that’s what I’ve called it.

    I found this in your support: https://support.rankmath.com/ticket/blog-page-does-not-show-up-in-breadcrumbs/

    Is this code what I need? And will it mess up anything else?

    Thanks.

    Roel John
    Rank Math business

    Hello,

    The issue is that you don’t have a category “Blog” in your post. So what Rank Math breadcrumbs do is that. It will get the current category you use in your post which is “General”.

    Yes. You can use the code in the URL you share. It will doesn’t mess up anything. I recommend you use FTP to apply the code or if you know the one you’re doing you can use wp-editor and put the code inside the functions.php. Just be careful to add the code using wp-editor it might take your site down. That’s why better if you use FTP.

    Please let us know if the code works so we can help you.

    Thanks.

    Yay! I modified the code a little so the url isn’t hard coded. This code worked to add “blog” in the breadcrumbs:

    /**
    * 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”,
    ($_SERVER[‘SERVER_NAME’]).”/blog/”,
    “hide_in_schema” => false
    )) );
    }
    return $crumbs;
    }, 10, 2);

    Anas
    Rank Math business

    Hello,

    We are super happy that your issue is resolved. 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)

The ticket ‘Breadcrumbs not showing blog’ is closed to new replies.