Site logo

Archived topic

Keep Menus Visable with Scroll

27 replies · Started by Eric on December 13, 2014

Viewing posts 16–28 of 28

Hi Tom,

It's working, as usual with all your tips :)

Not sure why my nav bar is tiny though, just thick enough to read the labels. What height are you recommending?

Seb

Totally up to you - some like it tall and some like it shorter.

I stick with the 60px tall (default), as it seems just right for me.

Hi there,

I did a pretty big mistake :/.

I wanted to have a sticky menu, so i copied Toms code from December 13, 2014 at 10:10 am into my functions.php and NOT in my child theme :(

Now I can't enter my page obviously, due to syntax error:
Parse error: syntax error, unexpected 'wp_enqueue_script' (T_STRING) in /www/htdocs/w014b720/dunstabzugshaube-umluft-test.de/wp-content/themes/generatepress/functions.php on line 654

It was so dump of me to copy it not in a child theme.

Can you help me guys?

You'll need to access your site via file manager (in your cpanel hosting) or FTP.

Then go to "wp-content/themes/generatepress" and open functions.php.

Then delete the code you added and save.

OMG, it works again! Thanks a lot Tom for your super quick response.

I'll just leave my menu as it is. To dangerous for me to try it again

Glad I could help :)

Our Menu Plus add-on adds all kinds of sticky menu features without you having to code.

I added the CSS and PHP to the files, but the menu and header are simply fixed, instead of a menu-scroll-to-top-and-stick.

Anything I'm doing wrong there?

I'm trying with the Menu add ons too. Basically, I don't really want the header and navigation to be stuck together.

Maybe it is the .js that I brought over from Exhibit. I'll try removing that. Maybe I just have a bunch of conflicts since I started messing with things. I'll start over and if you have any advice, I'll hear it. I might have this licked in a few.

menu-scroll-to-top-and-stick

Not too sure what you mean by this?

Are you trying to stick the menu only? Menu Plus isn't working for you?

HI,

I have a basic question. How do I make a sticky menu? Not using a child theme, but I don't see an option in GP premium, so perhaps I am missing something.

Never mind, I think I just figured it out.

is it possible to use the above solution to also make the secondary nav sticky? mine is below my header now and i'd like the header to disappear as the user scrolls and the secondary nav stick under the sticky primary menu that i set within the customizer.

Hi there,

Can you open a new topic and link us to what you have so far?

Thanks!

will do.

This archived topic is closed to new replies.