Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Item under sticky header

  • Hi,

    I have a sticky header, all good.
    I would like to put a bar of text underneath the navigation menu items.
    I have used generate_after_primary_menu, and this has put the item at the end of the menu items, rather than a new row underneath. this row will link to a contact us page and have some other contact info. I would like this as a persistent row under the menus. I’d also like to add the same thing above the menu, in the sticky header. Thanks!

  • Hi there,

    can you share a link to your site? Then i can assess the best place to make those changes.

  • deer.management/staging

  • Thanks so much for the help.

  • Can you try setting the GB container holding the BOOK headline block to width: 100%?
    https://docs.generateblocks.com/article/sizing-options-overview/

    Let me know 🙂

  • Hi, thanks – yes, that made the control span the 100% of the menu width. I was hoping to make the control span the whole width of the header / container, like a banner. Thx so much!

  • Then you need to use after_header hook.

    And change the top value to 70px in the below CSS:

    .sticky-header {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 1000;
        width: 100%;
    }
  • Brillaint – thanks so Much!

  • You are welcome   🙂

  • Ah, so there is now a side effect whereby the new bar position is now over the menu generation, so the menus now appear under the bar, presume there is maybe a Z setting for the menu?

    Thanks so much for all the help – this is my first day with generate press.

  • Hi there,

    the top property sets the top position of the sticky header.
    Change the CSS to this:

    
    .sticky-header {
        position: -webkit-sticky;
        position: sticky;
        top: 70px;
        z-index: 1000;
        width: 100%;
    }
    @media(max-width: 768px) {
       .sticky-header {
            top: 80px;
        } 
    }
    

    On desktop its set the top position to 70px to offset the sticky nav position. And it increases it to 80px for the taller mobile header .

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