rewrite breadcrumb value

#199816
  • Resolved Rk Dl
    Rank Math free

    On my site i have a custom post type with a name: ‘cptposttype’ with a slug ‘Posttype’
    The url looks good and shows up in the address bar like this:
    Url example of slug for custom post type

    The breadcrumb beneath the title on my posts shows the base cpt value: ‘cptposttype’, instead of the preffered slug ‘Posttype’:
    The way it shows up in the breadcrumb

    I’ve found the following code in the knowledge base that i added as a code snippet. but there is no explanation how the $crumbs array is defined, which is why i can’t figure out how to re-write ‘cptposttype’ to ‘Posttype’
    add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) {
    return $crumbs;
    }, 10, 2);

Viewing 2 replies - 1 through 2 (of 2 total)
  • Rk Dl
    Rank Math free

    The current breadcrumb

    Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention.

    Could you please also share the affected URL to further check? You can add it in the sensitive data section
    Sensitive Data Section

    It is completely secure, and only our support staff has access to that section.

    Looking forward to helping you.

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

The ticket ‘rewrite breadcrumb value’ is closed to new replies.