[Resolved] Breadcrumbs not working on pages

Home Forums Support Breadcrumbs not working on pages

  • This topic has 6 replies, 3 voices, and was last updated 11 months ago by David.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1046296
    Alex

    Hello,

    GP Premium with Elements enabled.

    I’ve been reading:

    Adding Breadcrumbs – Documentation
    https://docs.generatepress.com/article/adding-breadcrumbs/

    …and:

    Implement Yoast SEO breadcrumbs – Yoast Knowledge Base
    https://kb.yoast.com/kb/implement-wordpress-seo-breadcrumbs/

    …yet the breadcrumbs don’t display on pages. They do on blog posts.

    I have entered the shortcode correctly: “Add the shortcode provided by Yoast in this article:”

    I have [ wpseo_breadcrumb ] on line 1 and that is it. (Note: in shortcode, there are NO spaces between brackets and letters – I had to do that here to get the shortcode to display.)

    I added a location rule and set it to Pages/All Pages

    All other settings are as described in the GP article. I have Yoast Breadcrumbs enabled in the Yoast plugin settings too.

    I have used Yoast in the past but never had to do this before because previous themes had a simple breadcrumb setting which was easy for the technically challenged like me.

    I cleared my cache, checked in Brave incognito.

    Thanks for your help.

    Alex Rowan Psyche Mentoring
    Get profound power to beat your limits.
    With a veteran of DEEP experience.
    Have a better and more meaningful life.
    Mentor • Subconscious Mind Coach • Shaman • Eclectic Philosopher.
    Non-partisan. ENFJ. Ex 🇬🇧 in 🇦🇺.

    #1046328
    Leo
    Staff

    Hi there,

    Which hook are you currently using?

    I checked the single post Website Dedevelopment and don’t see breadcrumbs there either?

    #1046341
    Alex

    Hello Leo,

    Thanks for your response.

    I am using the before_entry_title hook as suggested in the GP article.

    Apologies that the blog breadcrumbs weren’t visible – I had been experimenting with possible solutions and at one stage had to restore my site.

    Among other things, I tried making a separate hook for pages.

    Alex Rowan Psyche Mentoring
    Get profound power to beat your limits.
    With a veteran of DEEP experience.
    Have a better and more meaningful life.
    Mentor • Subconscious Mind Coach • Shaman • Eclectic Philosopher.
    Non-partisan. ENFJ. Ex 🇬🇧 in 🇦🇺.

    #1046362
    Alex

    I have finished my research and have a resolution, – though it is not what I originally planned – some observations, and a question.

    After disabling the original hook, I created another one except that this time I inserted:

    <?php
    if ( function_exists(‘yoast_breadcrumb’) ) {
    yoast_breadcrumb(‘
    <p id=”breadcrumbs”>’,'</p>
    ‘);
    }
    ?>

    and then selected ‘before_main_content”, ticked “Execute PHP”, selected Posts/All Posts and Pages/All Pages and excluded the front page.

    The breadcrumbs now appear on both posts AND pages, and as it happens, in a better location (in my view).

    I might add that when I tested “before_entry_title” the breadcrumbs appeared on posts, but NOT on pages – the same issue as before.

    Do you have any idea why this is please? Is it a bug in GP perhaps?

    Thank you.

    Alex Rowan Psyche Mentoring
    Get profound power to beat your limits.
    With a veteran of DEEP experience.
    Have a better and more meaningful life.
    Mentor • Subconscious Mind Coach • Shaman • Eclectic Philosopher.
    Non-partisan. ENFJ. Ex 🇬🇧 in 🇦🇺.

    #1046546
    David
    Staff

    Hi there,

    the before_entry_title hook doesn’t exist on Pages. You can see all the main hooks here:

    https://docs.generatepress.com/article/hooks-visual-guide/

    #1046577
    Alex

    Thanks for letting me know David. That explains it.

    Alex Rowan Psyche Mentoring
    Get profound power to beat your limits.
    With a veteran of DEEP experience.
    Have a better and more meaningful life.
    Mentor • Subconscious Mind Coach • Shaman • Eclectic Philosopher.
    Non-partisan. ENFJ. Ex 🇬🇧 in 🇦🇺.

    #1046589
    David
    Staff
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.