- This topic has 7 replies, 2 voices, and was last updated 6 years, 11 months ago by Leo.
-
AuthorPosts
-
May 21, 2017 at 1:34 am #321547TWMA Support
Hi Hi
So I want to get a full width page header on my blog posts, as the page header seems to be placed inside the content area on single posts. I read your “How To” (https://docs.generatepress.com/article/blog-page-header/) and tried to apply the filter code snippet (
<?php add_filter( 'generate_get_blog_page_header','__return_true' ); ?>
– probably wrong) to the single.php and the content-single.php. This did nothing, but I think thats because it should go in the function.php file, but worried that will then affect all pages and posts…which I dont want)So I have the header working fine on the blog index page (using customise>blog) but not on the single post pages. How do I fix this?
May 21, 2017 at 6:54 am #321648LeoStaffCustomer SupportHi there,
Single posts page header should be created using the page header meta box as they are page specific. It should have full width option as well: https://docs.generatepress.com/article/page-header-overview/
If you want the same page header in the single posts as the main blog page, then use this function:
add_filter( 'generate_get_blog_page_header','tu_category_blog_page_header' ); function tu_category_blog_page_header() { if ( is_single() ) { return true; } return false; }
You should never have to add anything to function.php. Use one of these methods instead:
https://docs.generatepress.com/article/adding-php/May 21, 2017 at 7:43 am #321665TWMA SupportHi
Thanks for coming back to me.
I was using the page header meta in the post, but that isnt obeying the full width specification.
The meta settings are exactly the same as they are for a standard page. However instead of the meta content being displayed above the content area and sidebar, it is being displayed within the content area level with the sidebar. The meta is set to full width and have tried setting it to contained and it does the same thing…its almost as if its being overridden somewhere and it is being forced to be contained.
Thanks
May 21, 2017 at 7:46 am #321668LeoStaffCustomer SupportThat’s strange. The meta box should have the exact same options as the blog page header in the customizer.
Can you provide a link to the page? Thanks!
May 21, 2017 at 7:59 am #321671TWMA SupportHi Leo
Thanks. Its on my staging site so sending over to you now in a account support email.
Thanks
May 21, 2017 at 9:31 am #321702LeoStaffCustomer SupportTry Customizer > Layout > Page Header > Single Post Header Location > Above Content Area.
Let me know.
May 21, 2017 at 10:47 am #321740TWMA SupportThanks Leo, that did the trick. Cant believe I missed that one. LOL
May 21, 2017 at 10:48 am #321743LeoStaffCustomer SupportNo problem!
Easy one to miss for sure. That customizer panel will be reorganized soon 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.