Site logo

Archived topic

yoast breadcrums

8 replies · Started by Jose Andres on October 16, 2017

Viewing posts 1–9 of 9

I had the yoast breadcrumbs running with:

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

in the hook after header.
Now what is shown is something like this:

','
' ); }?>

I can not locate where the problem is and I have to disable it.

Can you help me?

Thank you
greetings

Hi there,

Can you try this?

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

Tested .. still not working properly

Hello, I had activated "define( 'GENERATE_HOOKS_DISALLOW_PHP', true );" and there was no option to execute php.
I have already solved. (edited single.php)
Thank you very much

Hey Jose,

I have already solved. (edited single.php)

Care to share how exactly you edited that file to solve the problem?
Might be helpful for other users, too.
Thanks!

I have edited single.php and I have placed:
<?php if ( function_exists('yoast_breadcrumb') ) : ?>
<?php yoast_breadcrumb( '<p id=”breadcrumbs”>','</p>' ); ?>
<?php endif; ?>
in the place that I wanted to appear,
in my case under the header
It is more comfortable in the hooks, but it does not work if you have disabled execute php

Thank you very much for your explanation!

It's definitely better to allow PHP in hook then add the code using my method.

If you add it in the theme's single.php it wouldn't save through updates.

This archived topic is closed to new replies.