Archived topic
adding breadcrumbs
9 replies · Started by Stevie on May 3, 2019
Hi chaps
I followed the instructions on adding breadcrumbs via hooks, using code from Yoast SEO ( which is installed).
I'm obviously doing something wrong. I haven't implemented breadcrumbs before but I hope to on my main site.
I've added the code to a test site and you can see what's popping up
http://radioimagelab.com/2019/01/my-test-page/
Hi there,
in the Hook Element you added your breadcrumb snippet can you check the Execute PHP checkbox.
Worked !
Thanks David. Do I leave the 'execute shortcodes' box checked too?
Awesome :) No only the PHP one is required.
Thanks so much David. Awesome support.
Just one more thing.
I've added the same Yoast code in Display Location Rule for page / all pages,
but doesn't seem to work.
http://radioimagelab.com/packages/animated-logos/
Which hook did you add it to?
Hi Tom
Added this code:
<?php
if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb( '<p id="breadcrumbs">','</p>' );
}
?>
DISPLAY RULES - page/ all pages
CONTENT - before_entry_title
The site I'm learning GP on, hasn't many pages.
But the page link has one sub page, so I expected to see something similar
to the post category thing. My main domain Glamourdaze has been around for 9 years and I've never used breadcrumbs before. So better late than never.
It looks like the page where it isn't displaying doesn't have an entry title, so that hook might not work. Maybe try before_content?
Hi Tom
That worked !
Many thanks
You're welcome :)