Site logo

Archived topic

Yoast Breadcrumb SEO

3 replies · Started by Paul on July 21, 2018

Viewing posts 1–4 of 4

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; ?>

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.

thanks!

No problem!

This archived topic is closed to new replies.