Archived topic
Hide "Header" when on buddypress pages at top of page, keep the scroll
23 replies · Started by Jeffrey on June 30, 2020
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 :)
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.
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.
Hi there,
try this CSS:
.buddypress #site-navigation:not(.navigation-stick) .main-nav ul li:not(.wc-menu-item) {
visibility: hidden;
}
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) :)
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
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.
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?
Is it possible to see one of the bb pages where my code should work ?
I had sent the login through contact the other day, where should I send it now?
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.
Hi there,
It all seems to be working for me. Is there a specific page I should visit to see it not working?
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.
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 )
YES!!!!! I bow to you gurus!