Archived topic
hook between Page Header and Entry Header
12 replies · Started by Jan on September 24, 2017
Hi,
how can I add content between Page Header and Entry Header?
thanks
Hi there,
GP hooks should help. Check out these two pages:
http://demo.generatepress.com/hook-locations/
https://docs.generatepress.com/article/hooks-overview/
Let me know.
Thanks for http://demo.generatepress.com/hook-locations/, I didn't know that page. I think the list isn't complete, generate_after_entry_header isn't listed.
Both "Page Header" and "Entry Header" are between generate_before_content and generate_after_entry_title hook. So, is it possible to squeeze some content between them?
What about the inside content container?
Hi Leo, inside content container doesn't work if one wants to put a full width sized element (aka section) below the page header and above the content. I would like to customize blog home page this way. Any thoughts?
Give this a shot: https://docs.generatepress.com/article/generate_before_main_content/
It creates a division of the generate-columns-container class inside the site-main element. To be able to create full width section (not contained) below the page header and above the blog index and sidebars, it would need further tweaking, I am afraid. Could you point me into right direction please?
I think we would need to hook after the generate-page-header element.
Can you link me to the page where you inserted it?
Unfortunatelly local server testing.I really thing the easiest way would be hooking after the generate-page-header element.
Ahh we can just use higher priority:
add_action( 'generate_after_header', 'lh_after_page_header', 15 );
function lh_after_page_header() {
?>
Your content in here
<?php
}
Amazing! Thank you.
Glad I could help :)