Breadcrumbs Query

#31855
  • Resolved Michael Martin
    Rank Math free

    HI all,

    I have not been able to get the breadcrumbs to work properly. The shortcode displays no problem at the top right of the page, but for reasons unknown to me, it only ever goes down 1 level in the page tree. For instance, take this page:

    https://reclaimdesign.org/reclaimed-wood-bath-caddy.html

    To get to this, in the main navigation menu I select Products then Bathroom then Bath Caddy, but the breadcrumb displays Home >> Bath Caddy. I would have thought it should display Home >> Products >> Bathroom >> Bath Caddy?

    • This topic was modified 4 years, 2 months ago by Michael Martin. Reason: Suggested to do so by Michael
Viewing 9 replies - 1 through 9 (of 9 total)
  • Hello,

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WP logins in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hi Michael, what did you find in your investigation?

    Hello,

    Thank you for contacting Rank Math today.

    The breadcrumb will show the path from the homepage and not your menu structure. I have taken a look at your back office and the affected link is a page and thus the breadcrumb will only display Home > Name of page.

    I have tested this with posts and the breadcrumbs are working as expected and showing all the items including categories.

    I’ve also tested the second issue but I cannot reproduce it as shown below:
    Screenshot

    Please clear your browser cache and test again.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hi Michael,

    How do I incorporate the menu hierarchy inside the breadcrumb? No matter what page I click there is only one level shown. I’d expect to see something like this:

    A breadcrumb trail or path based on viewing history is typically rendered as follows :

    Page viewed > Page viewed > Page viewed > Page viewed > Page currently being viewed

    For instance, in this scenario, a website visitor views seven pages (note how the pages are tracked in order the user viewed them) :

    Home page > Services > About Us > Home page > Latest Newsletter > Home page > Page currently being viewed

    Typical breadcrumbs following a hierarchical structure are shown as follows:

    Home page > Section page > Subsection page

    I’m not sure what the point is of having the breadcrumb in that case if it will only ever show one level?

    Hello,

    Thank you for contacting Rank Math today.

    You can use the following filter to embed some custom logic that will add some extra crumbs to the array:

    /**
     * Allow changing or removing the Breadcrumb items
     *
     * @param array       $crumbs The crumbs array.
     * @param Breadcrumbs $this   Current breadcrumb object.
     */
    add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) {
    	return $crumbs;
    }, 10, 2);

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hi Michael,

    I have just added that code as a snippet within WP, activated and cleared the cache. However nothing seems to have changed. Are there other steps I need to be taking in order to get the page menu hierarchy I am asking about?

    I see within the Breadcrumbs settings that there is an option to Show Categories. As far as I understand categories are for posts not pages? In which case is there a method I can use to incorporate them and see if Show Categories will work to show hierarchy in pages? If not how to pass hierarchy to the breadcrumb? I have had a look at the help file (https://rankmath.com/kb/general-settings/#breadcrumbs)
    and not found it very helpful. It doesn’t explain in detail about this point or the Taxonomy option below.

    Todd
    Rank Math free

    Hello,

    We are sorry but you are right – Categories only work on posts.

    If you want to use page hierarchy in your breadcrumbs – Rank Math will add that too.

    Are you adding the page like this?
    Backend: https://i.rankmath.com/tsAWyA
    Frontend: https://i.rankmath.com/JPYy4o

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Edit: Changed text after input from dev. team.

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

The ticket ‘Breadcrumbs Query’ is closed to new replies.