[Resolved] How to insert header over single posts using hooks?

Home Forums Support [Resolved] How to insert header over single posts using hooks?

Home Forums Support How to insert header over single posts using hooks?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #633738
    Derek

    Hello.

    I’ve got a working beaver builder footer site-wide by using: [fl_builder_insert_layout slug=”footer-menu”] in the “After Footer Widgets” GP Hooks area.

    I’m trying to do a similar thing but with a bb header, just under the main menu, but above my posts titles. I tried using:
    [fl_builder_insert_layout slug=”posts-header”] in the “After Header Content” GP Hooks area. I can’t seem to get it to work. Besides, even if I was able to get it to show up, there is the problem that I would need to limit this header to only my posts. How can I accomplish this?

    Thanks!

    #633757
    Derek

    Update:

    I was able to get it to work by using the “After Entry Title” Hook area. I just need help with two things:

    1.) How can I limit this to the single posts pages only?
    2.) How can I make the header full-width above the sidebars on my /test-page? I’m thinking I need to use a different hook area and maybe custom css? I want it flush with the menu. I’m using another hook for the breadcrumbs.

    Thanks!

    #633831
    David
    Staff
    Customer Support

    Hi there,

    the after header or inside content container hook would place it above the page content.
    To display it conditionally you can use tags:

    https://docs.generatepress.com/article/using-hooks-conditional-tags/

    #633868
    Derek

    Got it. Thanks!

    #633878
    David
    Staff
    Customer Support

    Glad to be of help.

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