Archived topic
Breadcrumb inside post hero
7 replies · Started by Khaled on March 26, 2020
Hi,
I would like to add breadcrumb inside post hero but using the following code inside post hero element doesn't work.
<?php
if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb( '<p id="breadcrumbs">','</p>' );
}
?>
Have a look at https://nexttotry.com/best-infuser-water-bottle-benefits/
Hi there,
see this topic - it explains the use of the Yoast shortcode:
https://generatepress.com/forums/topic/volume-implementing-breadcrumb-position/#post-1201660
Hi, i need to do the same.
Is possible to insert php code (php code of Yoast breadcrumbs) inside the post hero?
Now contain this code:
<h1>{{post_title}}</h1>
<p>By {{post_author}}</p>
How to do?
YOu can just add the breadcrumb shortcode in header element.
See the Implement breadcrumbs on pages using a shortcode section here:
https://yoast.com/help/implement-wordpress-seo-breadcrumbs/
Do you mean this?
<?php
if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb( '<p id="breadcrumbs">','</p>' );
}
?>
Or there is any other shortcake that can be insert along with the code for post hero?
<h1>{{post_title}}</h1>
<p>By {{post_author}}</p>
Hi There,
Header Elemetns cannot accept PHP - but they can accept shortcodes.
I explain in this topic the shortcode you require for Yoast:
https://generatepress.com/forums/topic/volume-implementing-breadcrumb-position/#post-1201660
thankyou :)
You're welcome