[Resolved] is page header location different for pages and posts

Home Forums Support [Resolved] is page header location different for pages and posts

Home Forums Support is page header location different for pages and posts

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #563057
    Natalie

    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

    #563192
    Tom
    Lead Developer
    Lead Developer

    The 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 πŸ™‚

    #563420
    Natalie

    wow – 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?

    #563479
    Tom
    Lead Developer
    Lead Developer

    We’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 πŸ™‚

    #563486
    Natalie

    perfect – gets my vote! πŸ™‚

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.