Site logo

Archived topic

Problem with breadcrumb placement and header elements...

5 replies · Started by Fernando on July 9, 2019

Viewing posts 1–6 of 6

Hello.

As I read, I insert yoast_breadcrumb() in the generate_after_header hook, and works well, but when using GP custom header elements the breadcrumb appears after them.

The question is: How do we to place the breadcrumb after the primary navigation and before the header element?

As I dont find the right hook... This theme needs one or two more hooks in that area, and built-in breadcrumbs!

Thank you.

Hi there,

Try reducing the priority of the hook element the lower the number will move the element up above any elements hooked in after the header.

Hello.

Yes I tried it. with priority=1 it appears before the primary navigation bar and with 6 it appears between the navigation and the header element.

But... I think this method is not secure, as other actions can modify the order, isn't it?

Hmm what do you mean by others?

It's the same thing if you don't set a specific order.

Only users with Admin access to your dashboard would be able to modify this.

Hello Leo,

I want to say, for example: if GP or GP Premium developers (you), change the priority of the actions (or the order in code), or add new actions, my priority (or execution order) could change, so the position changes.

That's why I say it doesn't look a secure method.

I think the theme needs more hooks in that area, and breadcrumbs!

Pd: I am testing Hook Elements and it looks a great way to implement all this things.

We won't ever change the priority of elements being hooked in by the theme. This is to preserve backward compatibility. So it's not something to be concerned about.

We are not 100% sure about adding breadcrumbs to theme at this time. If we were it would only be a basic trail. The difficulty here is that most sites will use an SEO plugin that provides them or a plugin like Breadcrumbs NavXT for more advanced options - making our code redundant. But it is something we're considering.

This archived topic is closed to new replies.