[Resolved] Help editing a hook for elements- no conditions

Home Forums Support [Resolved] Help editing a hook for elements- no conditions

Home Forums Support Help editing a hook for elements- no conditions

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #637352
    Derek

    Hi can someone help me re-write this php for elements since the conditional tags are not needed? I don’t know how to write php code…I just copied this..I don’t know what to delete or how to format it. Thank you!

    <?php if ( function_exists('yoast_breadcrumb') && is_single() ) : ?>
        <div class="grid-container yoast-breadcrumb">
            <?php yoast_breadcrumb( '<p id="breadcrumbs">','</p>' ); ?>
        </div>
    <?php endif; ?>
    GeneratePress 2.1.3
    GP Premium 1.6.2
    #637384
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You’d just need this:

    <?php if ( function_exists('yoast_breadcrumb') ) : ?>
        <div class="grid-container yoast-breadcrumb">
            <?php yoast_breadcrumb( '<p id="breadcrumbs">','</p>' ); ?>
        </div>
    <?php endif; ?>

    Then you’d need to set the Display Rules as “Posts > All Posts”.

    That should do it ๐Ÿ™‚

    #637403
    Derek

    Noted! Thank you.

    #637438
    Tom
    Lead Developer
    Lead Developer
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.