Site logo

Archived topic

Yoast Breadcrumbs and Generatepress Sections

5 replies · Started by Sigve on February 17, 2017

Viewing posts 1–6 of 6

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!

Hi there,

What if you use the "Inside Content Container" hook?

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!

Try this CSS:

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

Let me know.

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

Have a nice weekend!

Sigve

Glad we could help :) You as well!

This archived topic is closed to new replies.