Site logo

Archived topic

After Header hook

3 replies · Started by Ryan on January 31, 2019

Viewing posts 1–4 of 4

I was noticing the after_header hook works correctly on blog post types, it is placed right after the menu before the content and featured image. But if a featured image is enabled on a page the after header hook is after the featured image. Is there a way to place something before the featured image but after the header on pages?

Hi there,

you can try reducing the priority (default is 10) on the hook, a lower number will hook it earlier.
But it shouldn't come after an in post featured image. Can you link us to a page where that is happening.

When the featured image is above the content area like that, the priority matches the default (10).

So in this case, the featured image is initiating before the Element, which is why the Element is after.

If you reduce the priority of your Element as David suggested, it will work :)

This archived topic is closed to new replies.