Archived topic
Can't find a hook I need in the header area
11 replies · Started by John on December 6, 2017
I have a logo and widget in the header. Then I have my navigation set to appear below the Header area. I am also using the Page Headers premium feature so that I can add an image to the header area, but there doesn’t appear to be a hook for me to stick the image above the navigation. (screenshot attached)
I am not sure what the best way is to accomplish this in GeneratePress. I know I am doing it in a sort of hacking way.
Also is there anyway for the widget part of the header to appear in the mobile breakpoint?

We can try telling the featured image to appear before the navigation:
add_action( 'wp', 'tu_move_featured_image', 60 );
function tu_move_featured_image() {
remove_action( 'generate_after_header', 'generate_blog_single_featured_image' );
add_action( 'generate_after_header', 'generate_blog_single_featured_image', 4 );
}
Let me know :)
I was able to use a default image plugin to cover all the pages, but the featured image is showing up in the same place. Is there another setting in Generatepress I need to change?
I'm not sure what you mean - what are you trying to do?
I used the code you provided and the feature image is still showing up in the same place.
Trying to do this...

Getting the featured image to appear above the navigation bar instead of below it.
I just adjusted the code above - can you try now?
It is now appearing above the navigation which is great - but the one below the navigation is still there - so there are now 2 of the images on the page.

Getting closer! Just made another small adjustment to the code above :)
Still has the 2 images after I updated the code.
Wow it's stubborn. Last tweak - it will work now :)
That worked. Thank you so much for the help!
You're welcome! :)