[Resolved] Yoast Breadcrumbs and Generatepress Sections

Home Forums Support [Resolved] Yoast Breadcrumbs and Generatepress Sections

Home Forums Support Yoast Breadcrumbs and Generatepress Sections

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #280136
    Sigve

    Hey, it seems like my php code to implement the yoast breadcrumbs does not work on pages that use the generatepress sections.

    Here is my php code that i execute in GP hooks “Before content”:

    <?php if ( function_exists('yoast_breadcrumb') ) { ?>
        <?php if ( is_page() && !is_front_page() ) : ?>
    	<div class="grid-container grid-parent">
    		<div class="page-header">
    			<?php yoast_breadcrumb('<p id="breadcrumbs">','</p>'); ?>
    		</div>
    	</div>
        <?php endif; ?>
    <?php } ?>

    Example on page without sections, where breadcrumbs work: http://188.166.83.80/kurs/kranforerkurs

    Page that uses sections, where breadcrumbs does NOT work: http://188.166.83.80/kurs

    Anyone have any idea how the php code should look to make the breadcrumbs visible on pages using generatepress sections?

    Thanks!

    #280264
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    What if you use the “Inside Content Container” hook?

    #280313
    Sigve

    Hey, it showed up on all pages now, but the position is weird on the section pages.

    Take a look: http://188.166.83.80/kurs

    Thanks!

    #280384
    Leo
    Staff
    Customer Support

    Try this CSS:

    .page-header {
        margin: 40px 0 0;
        padding-left: 40px;
    }

    Let me know.

    #280390
    Sigve

    You guys are clutch, worked out great. Again thanks for the support, very appreciated!

    Have a nice weekend!

    Sigve

    #280392
    Leo
    Staff
    Customer Support

    Glad we could help 🙂 You as well!

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