[Resolved] is it possible to use the header widget only on first page?

Home Forums Support [Resolved] is it possible to use the header widget only on first page?

Home Forums Support is it possible to use the header widget only on first page?

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #915564
    Dalia

    Hello, question in the topic. I tried to use hooks, but with no luck.

    Greetings, Dalia

    #915566
    Leo
    Staff
    Customer Support

    Hi there,

    You can use this CSS to hide on every page except home page:

    body:not(.home) .header-widget {
        display: none;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    Let me know πŸ™‚

    #915579
    Dalia

    oh that was very fast. Thank you Leo.

    But now I’ve see, that the links I’ve added there, are behind the logo? I can not click on them.

    #915590
    Leo
    Staff
    Customer Support

    This CSS you’ve added is causing the issue:

    .header-widget {
        margin-bottom: -200px;
        float: left;
        padding: 10px;
    }
    #915596
    Dalia

    Yes, but at this position I want the widget πŸ™

    #915597
    Dalia

    ok, if it’s not possible I have two other options.

    1. is it possible to put the top bar at the first page at top of the header instead the top of the site?
    2. Switch the header menu to horizontal

    #915600
    Leo
    Staff
    Customer Support

    Do you mind doing this first?
    https://www.screencast.com/t/sAZU8h7bUcE

    #915601
    Dalia

    done

    #915606
    Leo
    Staff
    Customer Support

    so you want the top bar to be between the slider and main navigation on home page?

    Which hook are you using to add the slider currently?

    #915614
    Dalia

    I use the Hock before_header with the php for the slider.

    #915628
    Leo
    Staff
    Customer Support

    So you are using Hooks Element to insert the slider in before_header hook correct?

    If setting the priority to 1 should make it appear before the top bar.

    #915643
    Dalia

    Looks good. Thank you πŸ™‚

    But if someday the option with the header widget is possible that would be even better.

    #915645
    Leo
    Staff
    Customer Support

    Awesome πŸ™‚

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