Archived topic
Post category breadcrumb (placed in header) with yoast plugin
4 replies · Started by Philippe on February 17, 2018
Hi Tom and all other staff-folks,
I've been using GP for a few weeks now and i am happy to be working with a cool, fast template :-)
But I have problems with the Yoast Breadcrumb on the post category-page:
Post looks like this:
https://staging.sternwarte-peterberg.de/2017/plejaden-2/
The category page like this:
https://staging.sternwarte-peterberg.de/category/astronomie-aktuell/
The difference of the breadcrumb is clear.
What can I do?
Many thanks for the help!
Hi there,
Have you tried using the before content hook?
http://demo.generatepress.com/hook-locations/
https://docs.generatepress.com/article/hooks-overview/
I believe that's a better method than using page header. Your code would be something like this:
https://generatepress.com/forums/topic/adding-breadcrumbs-to-gp/#post-489535
Let me know if this helps.
Hello back,
awesome, i took this code and it works just fine.
<?php if ( function_exists('yoast_breadcrumb') && ! is_front_page() ) : ?>
<div class="grid-container yoast-breadcrumb">
<?php yoast_breadcrumb( '<p id="breadcrumbs">','</p>' ); ?>
</div>
<?php endif; ?>
Even main page of "the events calendar" jumps into breadcrumbs, only the single-event pages don't come in.
https://staging.sternwarte-peterberg.de/veranstaltung/2018-03-24/
Any further idea?
Thanx a lot for your quick assistance :)
Sorry, it's me again,
I just deleted the div-class (for simple try & error) - and now there is no extra horizontal space between breadcrumb and content-heading. just one fine vertical line
Feelin' great now ;-)
So this is all good now?