Site logo

Archived topic

Yoast Breadcrumb Hook

5 replies · Started by Andrea on July 10, 2020

Viewing posts 1–6 of 6

Hello,

I added Yoast breadcrumbs using the after_header hook, which is the correct location except I needed styling. I looked at a few other posts and it seems in order to add CSS I need to execute the PHP snippet instead so I could get the #breadcrumb id wrap.

I also added a code snippet with generate_after_header (orange background on my example). They are displaying in different locations, but should that be the case since they are the same hook? My PHP snippet is executing in a container below the header vs. outside of it.

Essentially what I am trying to accomplish is just add padding to the left side of the after_header hook (the non-orange breadcrumb), but not display it in the contained container.

Thanks for your awesome support!

Hi there,

Your site requires a login and password to view.

Can you disable that or provide the credentials?

Ack, I forgot I turned that on earlier. It's off now :) Sorry about that.

The orange background one is wrapped with this which is why they are showing up in different locations:
<div class="grid-container grid-parent">

Can you add it like this?

<div class="yoast-bc">
    [breadcrumb shortcode]
</div>

See shortcode here: https://yoast.com/help/implement-wordpress-seo-breadcrumbs/

Ah, yes. Thanks so much Leo, that worked.

No problem :)

This archived topic is closed to new replies.