Minor issue with breadcrumbs

#289218
  • Resolved Grzegorz K.
    Rank Math free

    Hello,
    We have a small issue with BreadcrumbList schema on Blog page only. Generated schema doesn’t contain Blog item (only Home). Screenshot: https://gyazo.com/8561e51340c6b4069095f7138a5d46c3

    We are using Flatsome theme and Rank Math Pro. I don’t think it’s a theme issue because I tried with their integration enabled and disabled. It affects styling only, not schema output.

    I can share access to staging environment without Rank Math Pro, however the same issue appears.

    Kind regards,
    Grzegorz

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

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

    Please add the following code to your website to make sure the blog page can also add position number two containing the blog to the Schema markup:

    
    add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) {
        if(!is_front_page() && is_home()) {
            $crumbs[1][1] = 'https://napogloves.com/blog/';
        }
        return $crumbs;
    }, 10, 2);
    

    You can apply this filter by following the steps here: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    ​​​​​​​Hope this helps solve your issues.

    Don’t hesitate to get in touch if you have any other questions.

    Hi Miguel,
    Thank you for this filter. I put it in functions.php and replaced hardcoded url with “get_post_type_archive_link( ‘post’ )” because it’s multisite.

    It works perfectly 🙂

    Best regards,
    Grzegorz

    Anas
    Rank Math business

    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 3 replies - 1 through 3 (of 3 total)

The ticket ‘Minor issue with breadcrumbs’ is closed to new replies.