Breadcrumb formatting

#612688
  • Resolved Anonymous
    Rank Math free

    Hi,

    I am having issues with formatting my breadcrumbs.

    At present, my breadcrumbs are showing as follows:

    ‘Home/Mushroom tea/Elevate’.

    I want to remove the ‘mushroom tea’ element, as it does not lead anywhere on my website. I am unsure where this aspect of the breadcrumb has been generate from, and I would like to delete it, so that my breadcrumb reads:

    ‘Home/Elevate’.

    Can you help?

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 try to add the following filter on your website and see if that works for you:

    add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) {
        if ( count( $crumbs ) >= 3 ) {
            array_splice( $crumbs, 1, 1 );
        }
    
        return $crumbs;
    }, 10, 2);
    

    Here’s how you can add filter/hook to your WordPress site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Let us know how it goes. Looking forward to helping you.

    Thank you.

    Anonymous
    Rank Math free

    Hi Rakibuzzaman,

    Thanks so much for your help, thats worked!

    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 ‘Breadcrumb formatting’ is closed to new replies.