[Resolved] hook between Page Header and Entry Header

Home Forums Support [Resolved] hook between Page Header and Entry Header

Home Forums Support hook between Page Header and Entry Header

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #391103
    Jan

    Hi,

    how can I add content between Page Header and Entry Header?

    thanks

    #391195
    Leo
    Staff
    Customer Support

    Hi there,

    GP hooks should help. Check out these two pages:
    http://demo.generatepress.com/hook-locations/
    https://docs.generatepress.com/article/hooks-overview/

    Let me know.

    #391373
    Jan

    Thanks for http://demo.generatepress.com/hook-locations/, I didn’t know that page. I think the list isn’t complete, generate_after_entry_header isn’t listed.

    Both “Page Header” and “Entry Header” are between generate_before_content and generate_after_entry_title hook. So, is it possible to squeeze some content between them?

    #391592
    Leo
    Staff
    Customer Support

    What about the inside content container?

    #395958
    Roman

    Hi Leo, inside content container doesn’t work if one wants to put a full width sized element (aka section) below the page header and above the content. I would like to customize blog home page this way. Any thoughts?

    #396063
    Leo
    Staff
    Customer Support
    #397392
    Roman

    It creates a division of the generate-columns-container class inside the site-main element. To be able to create full width section (not contained) below the page header and above the blog index and sidebars, it would need further tweaking, I am afraid. Could you point me into right direction please?

    #397398
    Roman

    I think we would need to hook after the generate-page-header element.

    #397401
    Leo
    Staff
    Customer Support

    Can you link me to the page where you inserted it?

    #397406
    Roman

    Unfortunatelly local server testing.I really thing the easiest way would be hooking after the generate-page-header element.

    #397460
    Leo
    Staff
    Customer Support

    Ahh we can just use higher priority:

    add_action( 'generate_after_header', 'lh_after_page_header', 15 );
    function lh_after_page_header() {
    ?>
        Your content in here
    <?php
    }
    #397483
    Roman

    Amazing! Thank you.

    #397487
    Leo
    Staff
    Customer Support

    Glad I could help 🙂

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