[Resolved] Page Header not full width on posts

Home Forums Support [Resolved] Page Header not full width on posts

Home Forums Support Page Header not full width on posts

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #321547
    TWMA 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?

    #321648
    Leo
    Staff
    Customer Support

    Hi 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/

    #321665
    TWMA Support

    Hi

    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

    #321668
    Leo
    Staff
    Customer Support

    That’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!

    #321671
    TWMA Support

    Hi Leo

    Thanks. Its on my staging site so sending over to you now in a account support email.

    Thanks

    #321702
    Leo
    Staff
    Customer Support

    Try Customizer > Layout > Page Header > Single Post Header Location > Above Content Area.

    Let me know.

    #321740
    TWMA Support

    Thanks Leo, that did the trick. Cant believe I missed that one. LOL

    #321743
    Leo
    Staff
    Customer Support

    No problem!

    Easy one to miss for sure. That customizer panel will be reorganized soon 🙂

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