[Resolved] Hide “Header” when on buddypress pages at top of page, keep the scroll

Home Forums Support [Resolved] Hide “Header” when on buddypress pages at top of page, keep the scroll

Home Forums Support Hide “Header” when on buddypress pages at top of page, keep the scroll

Viewing 15 posts - 1 through 15 (of 24 total)
  • Author
    Posts
  • #1347480
    Jeffrey

    I would like to be able to hide the header while on the BP template pages, however I still want to have the scroll effect where it comes down (header) when moving back to the top of the page. But then when reaching the top, have it disappear again.

    Would love the help ๐Ÿ™‚

    #1347526
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You should be able to use this code: https://docs.generatepress.com/article/show-sticky-navigation-only/

    However, you’ll need to add .buddypress in front of the selectors so it only targets BP templates.

    #1347750
    Jeffrey

    ok, that def worked, but unfortunately it didn’t give the desired effect. Is there a way to add another identical header with shopping cart, minus the navigation menu?
    If that makes sense.

    #1348128
    David
    Staff
    Customer Support

    Hi there,

    try this CSS:

    .buddypress #site-navigation:not(.navigation-stick) .main-nav ul li:not(.wc-menu-item) {
        visibility: hidden;
    }
    #1348481
    Jeffrey

    Maybe I explained it wrong. I would like an additional identical header with shopping cart, minus the navigation menu. So basically 2 different headers on one page.

    One scroll with nav
    One at the top with no nav

    So the first solution worked, but I want more.

    I guess I always want more.. (shrugs shoulders) ๐Ÿ™‚

    #1348665
    David
    Staff
    Customer Support

    That CSS should hide all the Menu items apart from the Shopping cart when the menu is at the Top. Try it without the .buddypress selector

    #1348705
    Jeffrey

    works for template, but not buddypress, just installed youzer templates, thats prob messing with it, although the first piece of css worked great.

    I’ll see if i ca find more info.

    #1348961
    Jeffrey

    So it works perfectly when I remove the .buddypress tag, just on every page. The tag worked for the other piece of code so I believe its correct. Any suggestions?

    #1349213
    David
    Staff
    Customer Support

    Is it possible to see one of the bb pages where my code should work ?

    #1349612
    Jeffrey

    I had sent the login through contact the other day, where should I send it now?

    #1349764
    David
    Staff
    Customer Support

    Sorry we don’t keep peoples login details for very long for security reasons. Can you resend them via the Account Issue form:

    https://generatepress.com/contact/

    Please add the URL of this topic to the form so we can track.

    #1349923
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    It all seems to be working for me. Is there a specific page I should visit to see it not working?

    #1349968
    Jeffrey

    The buddypress templates. I didn’t have the code up, Just put it back. Works on all other pages well without the .buddypress tag. Wnen the tag is applied it does not work.

    #1350511
    David
    Staff
    Customer Support

    Remove all the CSS that Tom and I provided. And add this:

    .buddypress #site-navigation:not(.navigation-stick) .main-nav ul li:not(.wc-menu-item) {
        display: none;
    }

    Tested in browser developers tools and it works ( but so did the others lol )

    #1350707
    Jeffrey

    YES!!!!! I bow to you gurus!

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