Archived topic
Breadcrumbs Displaying Weirdly
7 replies · Started by Kenson on May 7, 2020

I am trying to add breadcrumbs to my site to display on single pages, posts, and archives, but for some reason it's showing above my header. I have executed the hook and it is displaying, but not properly. I'd like it to be below the navigation if possible. How would one do this?
Hi there,
which Hook did you use ?
You can see the main hooks here:
https://docs.generatepress.com/article/hooks-visual-guide/
It was in wp_head, I guess that's an easy thing to overlook?
Put it in 'before_content' and it looks alright, although it doesn't show the post category now.

"Show Categories" is enabled in Rank Math settings.
wp_head is definitely not the right placement.
before_content or before_entry_title would be good:
https://docs.generatepress.com/article/adding-breadcrumbs/
Not sure why the category wouldn't display though - you would need to check with their support for this.
Yea, it's weird since I have it checked to 'Display category.' I'll see what they say, since I'm also doing a primary domain change (newer site thankfully).
Rank Math is preferred over Yoast for me (more features in Rank Math for free over Yoast).
Yup - The goal of that doc page is to explain how to add breadcrumb. We just use Yoast for example but the method should apply to other SEO plugins as well, just with different shortcodes/functions.
We'll see how long it takes them to respond, haha.
Sounds good :)