- This topic has 11 replies, 2 voices, and was last updated 3 years, 5 months ago by
Leo.
-
AuthorPosts
-
November 3, 2022 at 12:02 pm #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!
November 3, 2022 at 12:27 pm #2400560Leo
StaffCustomer SupportHi 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_titledoesn’t actually exist as I’d assume that you’ve disabled the content title.Is there a reason why the default title is disabled?
November 3, 2022 at 12:52 pm #2400575Andrea
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.
November 3, 2022 at 1:34 pm #2400610Leo
StaffCustomer SupportCan you clear and disable WP Rocket first?
November 3, 2022 at 1:52 pm #2400619Andrea
Disabled WP Rocket and cleared cache, still not showing :\
November 3, 2022 at 1:56 pm #2400622Leo
StaffCustomer SupportI don’t believe breadcrumbs are supposed to be working on static pages.
Are they working in single posts?
November 3, 2022 at 2:02 pm #2400629Andrea
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.
November 3, 2022 at 2:09 pm #2400631Leo
StaffCustomer SupportAhh the before_entry_title hook doesn’t exist for static pages as seen here:
https://docs.generatepress.com/article/hooks-visual-guide/#static-pageCan you try the
before_contenthook?I’d assume that’s how the other sites were added.
November 3, 2022 at 2:29 pm #2400655Andrea
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!
November 3, 2022 at 2:36 pm #2400664Leo
StaffCustomer SupportHow 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/November 3, 2022 at 3:00 pm #2400688Andrea
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!
November 3, 2022 at 3:42 pm #2400712Leo
StaffCustomer SupportNo problem 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.