- This topic has 6 replies, 3 voices, and was last updated 5 years, 11 months ago by
David.
-
AuthorPosts
-
October 27, 2019 at 6:09 pm #1046296
Leon Rowan
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.
October 27, 2019 at 7:32 pm #1046328Leo
StaffCustomer SupportHi there,
Which hook are you currently using?
I checked the single post Website Dedevelopment and don’t see breadcrumbs there either?
October 27, 2019 at 8:09 pm #1046341Leon Rowan
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.
October 27, 2019 at 8:43 pm #1046362Leon Rowan
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.
October 28, 2019 at 4:00 am #1046546David
StaffCustomer SupportHi there,
the before_entry_title hook doesn’t exist on Pages. You can see all the main hooks here:
October 28, 2019 at 4:42 am #1046577Leon Rowan
Thanks for letting me know David. That explains it.
October 28, 2019 at 4:52 am #1046589David
StaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.