Sticky primary menu
-
Is there a way to easily make the primary menu become sticky once you scroll past it?
-
Hi Paul,
I had the same issue and figured out Toivo itself does not have a option for a sticky menu. You can however download a plugin called “Sticky menu”. Then in the Sticky Menu (or Anything!) Settings set the “Sticky element” to #menu-primary. This makes the menu move on scroll, but a part dissapears. Set the “Space between top of page and sticky element” to 31 and this problem is solved. It works great for me.
I hope this helped you,
JulianThanks Julian, you’re the man! That was very helpful.
No problem, I’m glad to help you!
In case anyone else tries the Sticky Menu plugin with this theme, for the record I did not need to add any space between the top of page and the sticky element.
Julian, I noticed that on mobile devices the primary menu does not stick. Did you also have that issue? The plugin instructions say that this could happen in certain themes, and that’s what “dynamic mode” is for, but that still didn’t fix the issue for me. Curious to see if you found a solution for that.
That’s a cool plugin. If you can share a live site link I can take a look how it works.
No, I don’t have a solution for that (yet). I noticed on many themes it does not work, even if they have a built in sticky menu. Once I know more I will let you know.
Here for an exmaple: My totally messed up experimental site.
If you ask me I’d rather not stick the menu on mobile devices. For me it takes too much space and reading experience can be worse.
Yeah, I totally agree with that. However if you have a One-page site it’s terribe to scroll up the page to go to another section.
However if you have a One-page site it’s terribe to scroll up the page to go to another section.
In that scenario it’s good solution. Or even better if menu would appear only when you start to scroll up.
But as you have noticed I haven’t done sticky menu in Toivo theme. That’s just one of those design decisions you have to make when you build a theme.
That’s true. Just off topic: I have another topic on how to get the theme full width waiting for a reaction. Maybe someone can take a look at it?
https://wordpress.org/support/topic/theme-toivo-full-width-page?replies=1#post-6949050If you can share a live site link I can take a look how it works.
Hey Sami, the site where I’m using Toivo along with Sticky Menu is http://paulshryock.info. I see the points discussed above, and I still plan to look for a solution to make the mobile nav menu sticky. It’s a different element with a different id, which is what causes the issue. The plugin only allows specifying one id.
At first look it’s hard to say how the sticky menu plugin works on mobile. I’d ask from the plugin author.
The plugin only allows specifying one id.
Hi paul, Can’t you add different elements by separating them with a comma? I asume that’s what the example in the settings show you?
- The topic ‘Sticky primary menu’ is closed to new replies.