Site logo

[Resolved] Hooks before site-content

Home Forums Support [Resolved] Hooks before site-content

Home Forums Support Hooks before site-content

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #181262
    Markku

    Hello,

    I would like to know if there is a way to put content before the class “site-content”? I tested the hooks but still no luck. This would allow me to put content directly after header image.

    Thank you!

    <div id="page" class="hfeed site grid-container container grid-parent">
    --> Content here
    <div id="content" class="site-content">
    #181350
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Currently a hook doesn’t exist there.

    Any reason why you need to add your HTML in there and not inside the site-content element?

    #239339
    Branislav Pakic

    Hi Tom,

    I came to this thread searching for a way to add content before <div class="site-content" id="content">. The reason why I need that option are breadcrumbs. I find this position ideal for them as they could spread through the entire content width when using a layout with sidebars.

    If I place the breadcrumbs code inside GP Hooks locations “Inside Content Container” or “Before Content” I only get the content-area width for them.

    If you have a better solution please let me know.

    Cheers!

    #239408
    Tom
    Lead Developer
    Lead Developer

    I think this hook will do it: generate_inside_container

    However, it doesn’t seem to exist in GP Hooks, so you’ll need to manually use the hook: https://generatepress.com/knowledgebase/hook-list/

    Hope this helps 🙂

    #239582
    Branislav Pakic

    That did the trick, thanks a lot!

    #239649
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

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