[Support request] Breadcrumb inside post hero

Home Forums Support [Support request] Breadcrumb inside post hero

Home Forums Support Breadcrumb inside post hero

  • This topic has 7 replies, 4 voices, and was last updated 4 years ago by David.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1210528
    Khaled

    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/

    #1210575
    David
    Staff
    Customer Support

    Hi there,

    see this topic – it explains the use of the Yoast shortcode:

    https://generatepress.com/forums/topic/volume-implementing-breadcrumb-position/#post-1201660

    #1221067
    Alessandro

    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?

    #1221347
    Leo
    Staff
    Customer Support

    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/

    #1221680
    Khaled

    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>

    #1221878
    David
    Staff
    Customer Support

    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

    #1224526
    Alessandro

    thankyou 🙂

    #1224727
    David
    Staff
    Customer Support

    You’re welcome

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.