- This topic has 4 replies, 2 voices, and was last updated 5 years, 12 months ago by Natalie.
-
AuthorPosts
-
April 29, 2018 at 7:04 am #563057Natalie
I have created some page headers and applied them to different pages. They work fine
When I apply them to a blog post they seem to be added to a different place in the code, so they are not displaying correctly.
According to another post I read on here, the page header is hooked into the generate_after_header hook.
For my pages, that is exactly where the page header is, but for my posts it looks as though the page header is being hooked into the generate_before_main_content hook, as that is where it is when I look at the code.
I have tried with the same page header on both a page and a post, so it is not a problem with the page header.
The page header is very simple, all I did was put a slider shortcode in the content and leave everything else as default. ( I even tested with just a few words in the content instead of a slider shortcode – but same problem)
The real problem for me is that I have some custom post types that I am using as pages, but they are being treated like ‘posts’ when it comes to inserting the page header, so the page header is in the wrong place.
here is what the code looks like
</header><!-- #masthead --> <-------------- for pages , the page header is put here <div id="page" class="hfeed site grid-container container grid-parent"> <div id="content" class="site-content"> <div id="primary" class="content-area grid-parent mobile-grid-100 grid-100 tablet-grid-100"> <main id="main" class="site-main"> <-------------- for posts, the page header is put here
Thanks for your help
April 29, 2018 at 9:24 am #563192TomLead DeveloperLead DeveloperThe Page Headers are placed in a different area for posts. We’re working on deprecating that option so they’re all placed in the same area.
You can adjust the area in Customize > Layout > Page Header.
Let me know π
April 29, 2018 at 7:01 pm #563420Nataliewow – so simple. Thanks you so much and I’m so glad there is a solution.
Not sure how I missed that in the documentation as I did spend a couple of hours researching.
Re deprecating the option – I hope you mean deprecating the default being in a different location rather than removing the options all together?
April 29, 2018 at 9:20 pm #563479TomLead DeveloperLead DeveloperWe’d like to add the location options into the Page Header options, instead of having them in the Customizer. That way things will be visible π
April 29, 2018 at 9:47 pm #563486Natalieperfect – gets my vote! π
-
AuthorPosts
- You must be logged in to reply to this topic.