Breadcrumbs structure

#134265
  • Hello,

    I need to modify the breadcrumbs on a website, where I am using the primary category (Blog) to build the URL /blog/. I also associate to all the posts a child category that I don’t want to appear in the permalink, but I want it appears in the breadcrumb.

    Would it be possible to build a breadcrumb like the following one, without having to put the child category as the primary category?

    Home > Blog > Child Category > Post

    Thanks in advance!

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

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for the delay and for any inconvenience this issue may have caused you.

    When you have more than 1 category or contains a child category on a post, you will need to choose the primary category so it will appear in your Breadcrumbs:
    Breadcrumbs Primary Term

    If you choose the parent category as a primary term, the breadcrumbs will not display the child category.

    I hope that helps. Thank you, and please don’t hesitate to contact us if you need further assistance.

    Hi,

    Thanks for the quick answer, but I don’t need your proposal.

    I need to be able to mark the parent category as “primary category” but that the breadcrumbs also show the child category.

    In other words, I need the URL to be /blog/postitle/, where “blog” will be the primary category (and will have another child category that will appear on breadcrumb but won’t be shown in the permalink).

    I have been doing some tests with filters (https://rankmath.com/kb/filters-hooks-api-developer/#change-breadcrumb-settings) but it has not been possible.

    Do you know if there is a possibility to do it with code?

    thanks again!

    Hello,

    This can only be done by customizing the breadcrumb code. You can refer to the modified code in this thread: https://support.rankmath.com/ticket/help-with-code-for-custom-breadcrumbs/?view=all

    In your case you will have to get the child category and it’s URL then add it to your posts breadcrumbs in the front end.

    We don’t usually provide code customizations, just guiding you. You will need to be a developer or hire one to help you wit this customization.

    Hope this helps you. Thank you

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

You must be logged in to reply to this ticket.