Unsetting breadcrumb and separator

#530262
  • Resolved Khwarizma
    Rank Math free

    Hi,
    I have another problem with my breadcrumb.
    I read https://support.rankmath.com/ticket/remove-breadcrumb-items-and-separator/, but my situation is a bit different.
    Let’s say this is the original breadcrumb:
    Home > One > Two > Three > Four

    When I remove One using this code:
    add_filter( ‘rank_math/frontend/breadcrumb/items’, function( $crumbs, $class ) {
    unset ($crumbs[1]);
    return $crumbs;
    }, 10, 2);

    This is what I get:
    Home > Two > ThreeFour >

    1. There’s a trailing > at the end
    2. Three and Four combine and the link to Three is inactive.
    3. If I view Three, the breadcrumb becomes Home > TwoThree >, Two and Three combine and the link to Two is inactive.

    Could you please help me with this?

    Thank you.

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

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

    Can you please confirm if you’ve tried this one?
    https://support.rankmath.com/ticket/remove-breadcrumb-items-and-separator/?view=all#post-445527

    That should work in your case as well. Make sure to change the values according to your needs.

    Looking forward to hearing back from you.

    Thank you.

    Thank you for your response.
    Yes, I can confirm that I have tried that, as mentioned in my first post.

    The problem still exists.

    Also, when I click the parent post, the rule disappears and One appears again.

    Hello,

    I’ve added a filter to your child theme’s functions.php file and seems to be working as expected. Can you please check and confirm if it’s working for you as well?

    Looking forward to hearing back from you.

    Than you.

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

The ticket ‘Unsetting breadcrumb and separator’ is closed to new replies.