- This topic has 4 replies, 3 voices, and was last updated 6 years ago by John.
-
AuthorPosts
-
February 12, 2018 at 8:44 pm #494908Kathy
New to GP & GP-pro – all up-to-date versions.
I have a static front page and the blog is on a separate page.
I have a page header that appears as wanted on SINGLE posts – in the content area next to sidebar, however, I need the same page header to appear in the same place, in content area next to sidebar, on the blog page – but no matter what I set, it still appears at the top, above both the content area AND the side bar on the blog page.Page Header settings:
Global Locations:
Posts Page = my blog page
Posts = my blog pageSettings in header:
container = contained
inner = containedIn the customizer: Layout > Page Header:
Single post location = Inside Content Area
This works as expected and changes as expected if I switch it to outsidePage Header Location = Inside Content Area
This does not work as expected. The header is at top, across both content and sidebar.
SWITCHING back and forth between inside/outside does not make any change at all. it always remains above the content & sidebar.Am I missing something??
This is a fresh install, no added CSS of any kind, blog page and blog entries are all standard WP editor created; using standard GP theme template; nothing has been added to functions.php; no cache runningthanks
– kathyFebruary 13, 2018 at 9:03 am #495419TomLead DeveloperLead DeveloperHi Kathy,
We’re actually working towards deprecated the Customize > Layout > Page Header section – those options currently only apply to single posts and pages.
Instead, we’ll be adding a location option to the actual page header settings.
For now, try this PHP:
add_action( 'wp', 'tu_move_page_header', 20 ); function tu_move_page_header() { if ( ! function_exists( 'generate_get_blog_page_header' ) ) { return; } if ( is_singular() || generate_get_blog_page_header() ) { remove_action( 'generate_after_header', 'generate_page_header' ); add_action( 'generate_before_content', 'generate_page_header' ); } }
Let me know if that works or not ๐
February 13, 2018 at 11:38 am #495544KathyLooking forward to location options in the page header section – until then, this WORKS!
Thanks!February 13, 2018 at 8:21 pm #495807TomLead DeveloperLead DeveloperYou’re welcome ๐
March 12, 2018 at 12:19 am #517528JohnHello, thank you for the above explanation re single posts/ pages.
I have the same issue with the Page Header Location not appearing inside the Content Area on my Shop category pages. So it appears above both Products and Sidebar. Looking at the above PHP fix for Blog Post page. Sorry to ask, but are you able to help with a fix for Pages? Would really help.
Thanks John
-
AuthorPosts
- You must be logged in to reply to this topic.