Site logo

[Resolved] Yoast breadcrumbs hook not showing in correct location

Home Forums Support [Resolved] Yoast breadcrumbs hook not showing in correct location

Home Forums Support Yoast breadcrumbs hook not showing in correct location

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #2400532
    Andrea

    Hello,

    Using the hooks visual guide in the documentation on a static page, I have been unable to get the breadcrumb hook to display in the location I need. I am trying to display the breadcrumbs right above the first H1 in the main content area using generate_before_entry_title but it’s not showing. It works on other locations, such as before_main_content, etc. but just not that one.

    Thanks for any help!

    #2400560
    Leo
    Staff
    Customer Support

    Hi there,

    The <h1> title AdvancedMD EHR Software is added with GenerateBlocks so that’s not the theme’s default title.

    This means that the generate_before_entry_title doesn’t actually exist as I’d assume that you’ve disabled the content title.

    Is there a reason why the default title is disabled?

    #2400575
    Andrea

    Hi Leo,

    I’m not sure why the default content title was disabled. I enabled it and it is displaying now but the breadcrumb hook is still not displaying.

    #2400610
    Leo
    Staff
    Customer Support

    Can you clear and disable WP Rocket first?

    #2400619
    Andrea

    Disabled WP Rocket and cleared cache, still not showing :\

    #2400622
    Leo
    Staff
    Customer Support

    I don’t believe breadcrumbs are supposed to be working on static pages.

    Are they working in single posts?

    #2400629
    Andrea

    Yes it is showing in the correct location on a single post. I have many other GP sites that I have breadcrumbs working on static pages, not sure if any with that precise location. It does work on the static pages in other locations but just not before_entry_title which is where I want it to display.

    #2400631
    Leo
    Staff
    Customer Support

    Ahh the before_entry_title hook doesn’t exist for static pages as seen here:
    https://docs.generatepress.com/article/hooks-visual-guide/#static-page

    Can you try the before_content hook?

    I’d assume that’s how the other sites were added.

    #2400655
    Andrea

    Ah, ok! Shoot I should have caught that. Thank you.

    The breadcrumb is now displaying in the correct place :))

    Now that I re-enabled the Content Title – is there a way to get the Content Title to also display in a contained container vs full width? The breadcrumb is Contained but not the Content Title below it?

    The page/main content container is set as full width which needs to stay that way because this site has both full width and contained blocks for content that vary page by page. I think this maybe was why we stripped out the Content Title to begin with and used a block.

    Thank you for all of your help, much appreciated!

    #2400664
    Leo
    Staff
    Customer Support

    How are you adding the GB title currently? Just manually adding it everytime?

    If so I think creating a block element post meta template with the title and breadcrumbs included is the best option:
    https://docs.generatepress.com/article/block-element-post-meta-template/

    #2400688
    Andrea

    Yes we were adding it manually every time because of that full width container problem. Wow, this is a far more elegant solution and works perfectly for what I’m trying to accomplish. Thank you for sharing the feature – never new it existed – and all of your help. Cheers!

    #2400712
    Leo
    Staff
    Customer Support

    No problem 🙂

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.