[Resolved] yoast breadcrums

Home Forums Support [Resolved] yoast breadcrums

Home Forums Support yoast breadcrums

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #403999
    Jose Andres

    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

    #404217
    Leo
    Staff
    Customer Support

    Hi there,

    Can you try this?

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

    Tested .. still not working properly

    #404355
    Leo
    Staff
    Customer Support

    Hmm that code should be correct as Tom suggested here: https://generatepress.com/forums/topic/breadcrumbs-by-yoast-how-to-exclude-particular-pages/#post-387416

    Is execute PHP checked?

    #404663
    Jose Andres

    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

    #404711
    john770

    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!

    #404735
    Jose Andres

    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

    #404736
    john770

    Thank you very much for your explanation!

    #404991
    Leo
    Staff
    Customer Support

    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.

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