Archived topic
Bread crumbs for non posts
20 replies · Started by Louis on May 2, 2019
My web site is static pages with no blog posts. In this article - https://docs.generatepress.com/article/adding-breadcrumbs/ it says to use the Post as a location. In my use case should I use Post or another such as Site, etc.?
Thank you.
Hi there,
Yup - you can add Page to the display rules as well.
Or try Entire Site if you want it on every page.
Let me know if this helps :)
Thanks, Leo. Would entire site be better for SEO?
I think it depends on your site more than anything. It might not make sense to have breadcrumbs everywhere (404 page? etc..)
It's worth trying though - see how it works on your site. You might end up excluding some areas.
Thank you for the help.
No problem :)
May be a slight problem - After enabling, I only get the Home hyperlink to show up. Not the trail of breadcrumbs. Is there a way I can send a screenshot?
Hi there,
The page is there, its just not visible as its the same color as the background. So edit your hook element and change the hook to before_content. This will move it into the content area with the white background.
Now it shows in the content area but says: https://kb.yoast.com/kb/implement-wordpress-seo-breadcrumbs/
What's the exact code you're adding?
So you're using this code in the Element?:
<?php
if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb( '<p id="breadcrumbs">','</p>' );
}
?>
No. I was using https://kb.yoast.com/kb/implement-wordpress-seo-breadcrumbs/ that I found here: https://docs.generatepress.com/article/adding-breadcrumbs/
Should I use: <?php
if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb( '<p id="breadcrumbs">','</p>' );
}
?>
I'm guessing yes. :-) I gave it a try. Now I just get the code on the pages.
<?php
if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb( '<p id="breadcrumbs">','</p>' );
}
?>
I also did this - NOTE: Depending on your theme you may or may not need to add in the beginning <php and ending ?> php tags. If you are not sure, your theme developer can help.
No luck.