[Resolved] Yoast Breadcrumb SEO

Home Forums Support [Resolved] Yoast Breadcrumb SEO

Home Forums Support Yoast Breadcrumb SEO

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #629195
    Paul

    Hi there – I’ve dug through various support tickets to find the answer, but I’m now stuck.

    I want to do two things:
    1. only have breadcrumbs shown on single posts (not category pages that list all posts. eg. Tips list)
    2. move my breadcrumb to the left so it is in line with the title of the post

    I have added the following code only in before content (with PHP ex.):
    <?php if ( function_exists(‘yoast_breadcrumb’) ) : ?>

    <?php yoast_breadcrumb( ‘<p id=”breadcrumbs”>’,'</p>’ ); ?>

    <?php endif; ?>

    GP Premium 1.6.2
    #629291
    Leo
    Staff
    Customer Support

    Hi there,

    Try this code:

    <?php if ( function_exists('yoast_breadcrumb') && is_single() ) : ?>
        <?php yoast_breadcrumb( '<p id="breadcrumbs">','</p>' ); ?>
    <?php endif; ?>

    in Before Content hook in the hooks module:
    https://docs.generatepress.com/article/hooks-overview/

    Make sure execute PHP is checked.

    #629632
    Paul

    thanks!

    #629917
    Leo
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.