Site logo

Archived topic

Adding Breadcrumbs

15 replies · Started by Mitch and Justine on April 29, 2020

Viewing posts 1–15 of 16

We just tried to add breadcrumbs with the following steps:

1) Creating a hook element
2) Adding in this short code as laid out in the Yoast breadcrumb article (see below)

<?php
if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb( '<p id="breadcrumbs">','</p>' );
}
?>

3) Enabling breadcrumbs through our Yoast plugin

Can you confirm that this is the right code to add in because we could see part of the actual code on the front end of our website. We followed these two articles:

https://docs.generatepress.com/article/adding-breadcrumbs/
https://yoast.com/help/implement-wordpress-seo-breadcrumbs/

Hi there,

Can you confirm that execute PHP is checked in the hook element?

Let me know :)

Yes, we did check that box. I tried re-doing it this morning, and this is the error message I'm getting:

Parse error: syntax error, unexpected 'id' (T_STRING), expecting ')' in /home/customer/www/brokebankvegan.com/public_html/wp-content/plugins/gp-premium/elements/class-hooks.php(180) : eval()'d code on line 3

So, will we have to insert this short code on every post that we do? Or should we insert this short code in the hook element?

That's the article we had followed before. So instead of adding the code generated by Yoast, add in this code?

[wpseo_breadcrumb]

breadcrumb

Okay, never mind that short code worked! Thank you!

No problem :)

Hi. I am doing excatly this but no breadcrumbs are showing on the front-end.

This archived topic is closed to new replies.