Have you considered leaving these links off of your navbar? You can always type the URL when you are logged on to get to those pages. (Of course that doesn't stop your viewers from doing the same thing.)
I'd like to think that someone will (or has) come up with the URL to hide navbar entries when you are not logged in.
I'd like to think that someone will (or has) come up with the URL to hide navbar entries when you are not logged in.
--- Denise
You can do that with CSS like this:
/* Hide page link for general users: */
.sm-page-widget-nav a[href$="/About-me"] {
display:none;
}
/* But show it if I'm logged in: */
.sm-user-loggedin .sm-page-widget-nav a[href$="/About-me"] {
display:inline;
}
Just change the "/About-me" to the address of the page you want to hide (e.g. "/search" or "/browse"). Although it's pretty hard to hide "browse" since it appears on your default breadcrumb navigation bars.
/* Hide page link for general users: */
.sm-page-widget-nav a[href$="/About-me"] {
display:none;
}
/* But show it if I'm logged in: */
.sm-user-loggedin .sm-page-widget-nav a[href$="/About-me"] {
display:inline;
}
Just change the "/About-me" to the address of the page you want to hide (e.g. "/search" or "/browse"). Although it's pretty hard to hide "browse" since it appears on your default breadcrumb navigation bars.
Thanks! It's always good to know where to find this code when someone asks.
I'm not sure what you mean by browse appearing on default breadcrumb nav bars. Doesn't that depend on the OP placing browse in the navbar? On my site I don't have /browse in the navbar. Yes, someone can enter that in the URL, but as soon as a folder or gallery is clicked there is no browse entry in the breadcrumb.
That's odd, I could have sworn that Browse was on the breadcrumbs, but now that I try it, the home icon definitely takes me to the index page. I guess I just remembered wrong!
This worked great for me to hide the "Browse" link from visitors.
I then realized the changes didn't have an effect on the mobile site, so I added the following CSS and it it also suppressed it there too. You will need change "browse" to the menu item you are trying to hide.
/* HIDE BROWSE LINK ON MOBILE SITE */
@media screen and (max-width: 640px) {
.sm-accordion-item.sm-nav-item-toplevel a[href$="/browse"] {
display:none;
}
}
/* SHOW BROWSE LINK WHEN LOGGED IN ON MOBILE SITE */
@media screen and (max-width: 640px) {
.sm-user-loggedin .sm-accordion-item.sm-nav-item-toplevel a[href$="/browse"] {
display:inline;
}
}
Keep in mind that others who know that browse and search exist can simply enter those pages via the browser's URL input location. The CSS above hides them from the visible menu (only).
The CSS above hides them from the visible menu (only).
Yes, exactly! As I said it hides the "link", not the page. This useful not for preventing access to content (there are other tools for that) but for guiding a visitors experience.
Comments
I'd like to think that someone will (or has) come up with the URL to hide navbar entries when you are not logged in.
--- Denise
Musings & ramblings at https://denisegoldberg.blogspot.com
You can do that with CSS like this:
Just change the "/About-me" to the address of the page you want to hide (e.g. "/search" or "/browse"). Although it's pretty hard to hide "browse" since it appears on your default breadcrumb navigation bars.
Please check out my gallery of customisations for the New SmugMug, more to come!
I'm not sure what you mean by browse appearing on default breadcrumb nav bars. Doesn't that depend on the OP placing browse in the navbar? On my site I don't have /browse in the navbar. Yes, someone can enter that in the URL, but as soon as a folder or gallery is clicked there is no browse entry in the breadcrumb.
--- Denise
Musings & ramblings at https://denisegoldberg.blogspot.com
Please check out my gallery of customisations for the New SmugMug, more to come!
I then realized the changes didn't have an effect on the mobile site, so I added the following CSS and it it also suppressed it there too. You will need change "browse" to the menu item you are trying to hide.
My SmugMug
--- Denise
Musings & ramblings at https://denisegoldberg.blogspot.com
Caroline
www.carolineshipsey.co.uk - Follow me on G+
[/URL]
Yes, exactly! As I said it hides the "link", not the page. This useful not for preventing access to content (there are other tools for that) but for guiding a visitors experience.
My SmugMug