Site logo

[Resolved] Adding ribbon below header

Home Forums Support [Resolved] Adding ribbon below header

Home Forums Support Adding ribbon below header

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1849045
    Sufia

    Hi, I have an affiliate disclaimer on many of my posts (check the private information box). I want to create a ribbon right below the header and place the disclaimer in there. I tried the top bar widget but it creates a ribbon above the header. Also, the ribbon appears throughout the site. I only want the ribbon on posts not pages and certainly not the homepage.

    Any idea how to achieve this? Is there a plugin that you would recommend or maybe we can add some CSS? Whichever option doesn’t slow down my website.

    It’s probably worth mentioning that I would love to have the flexibility to control the background color of the ribbon. If you see the disclaimer I have on my posts right now, I would love to retain that background color.

    #1849050
    David
    Staff
    Customer Support

    Hi there,

    you can use a Block Element:

    https://docs.generatepress.com/article/block-element-overview/

    Within the new block element – build you disclaimer with GenerateBlocks ( like you have in your content ).
    Then set the Hook to: after_header this will place it immediately after the site header. If you want it below your page hero then increase the priority to 25

    Then in the Display Rules > Locations – select Posts > All Posts

    #1849073
    Sufia

    Tried it on my staging site. It worked. Thanks a lot, David 🙂

    #1849090
    David
    Staff
    Customer Support

    Glad to be of help!

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