• Resolved kwent

    (@kwent)


    Hi everyone,

    I’m encoutering an issue (or maybe just à configuration problem) with the breadcrumb function.

    When i’m in the archive page called “formations” everything works well. The breadcrumb shows “Home>Formations” but when I go in a formation page (blog post) the the breadcrumb shows “Home>formation>blogpostname”, as you can see, the page “formation” in now without an “s” and when I click on “formation” in the breadcrumb it send me to a different page than the “formations” (with an s) page.

    I put the link so you can try.

    I don’t know how to fix this. If someone have the answer it would help a lot!

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @kwent,

    Thank you for contacting the support.

    The Formation page seems to be the default archive page of your post type and that’s why it is being included in the breadcrumbs instead of the custom archive page you have created.

    You can modify and use the following filter to change the breadcrumbs for the Formations post type:
    add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) { if(get_post_type == 'formations') { //name of your post type $crumbs[1][0] = 'Formations'; $crumbs[1][1] = 'https://wp.preprod.ciffco.com/formations/'; return $crumbs; } return $crumbs; }, 10, 2);

    Here is how to add a filter to your site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps.

    Thread Starter kwent

    (@kwent)

    Hi!

    Thank you very much, it works perfectly!

    Have a nice day!

    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @kwent

    Glad that helped.

    If it isn’t too much to ask for – would you mind leaving us a review here?
    https://ww.wp.xz.cn/support/plugin/seo-by-rank-math/reviews/#new-post

    It only takes a couple of minutes but helps us tremendously.

    It would mean so much to us and would go a really long way.

    Thank you.​​

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Breadcrumb issue’ is closed to new replies.