Archived topic
Displaying category hierarchy like breadcrumbs in page header
7 replies · Started by Mehmet Akif Kaban on May 23, 2019
Hello,
I want to display category hierarchy like below in the page header in a separate line.
Help appreciated. Thanks
Category 1 >>> Category 2 >> Category 3
Hi there,
GP doesn't have built-in breadcrumb feature.
I'll recommend checking out a plugin like YoastSEO.
Let me know :)
Thanks, But is there a way to do that without Yoast? I just need to display hierarchy, nothing else.
Category 1 >>> Category 2 >> Category 3
If the answer is no can u help me adding that to Page Header element
Thanks
Sorry you just want to display the categories?
If so try the template tags:
https://docs.generatepress.com/article/header-element-template-tags/#post_terms-taxonomy
Thanks Leo
I just enabled breadcrumbs from Yoast Seo.
I have found this hook, But how to appy it to global page header? I cant find the option for this.
<?php if ( function_exists('yoast_breadcrumb') ) { ?>
<?php } ?>
If you only want to display categories, then I don't think you actually need YoastSEO.
Try the template tag solution suggested here:
https://generatepress.com/forums/topic/displaying-category-hierarchy-like-breadcrumbs-in-page-header/#post-910003
If you want to install Yoast still, take a look at this:
https://docs.generatepress.com/article/adding-breadcrumbs/
Hello,
I'm trying to do this as well. I'm using RankMath SEO. I enabled breadcrumbs in the RankMath SEO settings. Next, I created a hook in GP Premium elements. I'm getting the breadcrumbs to show up but they're not looking how I want them to look. I just want the categories to show up as breadcrumbs.
This isn't my page, but I'd like them to look like this:
https://www.simplyrecipes.com/recipes/green_bean_salad_with_basil_balsamic_and_parmesan/
This is my page, and this is how my breadcrumbs are showing up:
https://thegoldenlamb.com/banana-bread-recipe-without-butter/
In the RankMath settings, I made sure to select "show category" but it's not drilling down to my categories.
I want my breadcrumbs to look like this:
Recipes >> Desserts
Hi Kelsey,
The theme itself has no control over the breadcrumbs features from RankMath.
If you have issues with the options not working, please check with their support team.
Thanks!