Archived topic
Breadcrumb not able to..
11 replies · Started by Afreen on June 28, 2021
I tried most of all the dropdown list available on the section on the hook but can't able to display the breadcrumb on the below banner and before the title, I mentioned the image as a reference to show you the exact place I need.
https://ibb.co/5h0G65D
For more insight review you can check my website page link placed in the private section.
Hi Afreen,
Unfortunately there is NOT such a hook that can hook things to your desired position.
But you could try this workaround method:
1. Replace the first GB container (hero section) of the content by using a block element, choose page hero as the element type.
2. Set the breadcrumbs hook to generate_after_header.
Hope that's helpful :)
1. Replace the first GB container (hero section) of the content by using a block element, choose page hero as the element type.
Sorry I confused can you please show me some steps to finish this, I am very appreciate to you ?
Hi there,
this article explains how to create a Block Element Page Hero:
https://docs.generatepress.com/article/block-element-page-hero/
So the hero you have created in the Post editor needs to be built in the Block Element. This will allow the breadcrumb to be hooked after it.
I am using the different header banners for different pages, as I need for the web pages not for the posts?
Then you need to build different block element - page heros, and assign them individually to different pages if you want the breadcrumbs to show below page hero.
I'm afraid that's the only way...
Unless the breadcrumb plugin can provide a shortcode, then you just need to insert the shortcode below the first section of your page.
Yes, I am using the rankmath PRO and I have the breadcrumb shortcode to use to display it on the website, Let me know is any easy and smooth way to do it?
If you have the shortcode, then why not just paste the shortcode below the first section of the page?
I know it's quite some work to edit each page, but it's not gonna work with hook elements, since there's no hook that can hook things into the page/post content itself.
No problem at all as it's a one time I will do it to paste the shortcode on every page, I have 2 queries for you:
1. The first section you mean where the h1 header title I used for the page heading? I have made one on the page, please have a look at the link is mentioned in the private section you can check the source code and let me know is the correct way I did it?
2. The way I am using this shortcode on every page before heading is it affect to website SEO?
Awaiting your response.
Hi Afreen,
Are you trying to place the shortcode directly above the title wrapper element?
If yes, you can use the generate_before_content but set the priority to 20.
If you want to add the shortcode INSIDE the title wrapper element but BEFORE the title itself, you can use generate_before_page_title hook.
For #2) No that's fine. :)
Elvin, I can't find the generate_before_page_title on the dropdown?
Hi Afreen,
For question 1, I think Elvin is misunderstood your question and didn't realize this page is built completely with GB.
I just checked the page, yes, it is what I meant, looks good :)
https://www.screencast.com/t/UiacMjMj
For question 2, I don't think so, as long as the title is marked as H1.