Site logo

Archived topic

How to show site title only when nav bar turns sticky

5 replies · Started by madmanweb on June 6, 2019

Viewing posts 1–6 of 6

Hi.

As you can see on my site, the "site title" is turned off because there is a giant logo on top. But this logo disappears after scrolling down.

Is there any way to show the site title only when someone has scrolled down (i.e., when the nav bar becomes "sticky") so that it's not lost from view? I need it to happen only on the desktop view.

Hmmm, so kinda mixed results. The snippet works only if I assign a logo to the sticky navigation bar, not without. I guess I could try a clumsy hack like setting the logo to be 1x1 pixel, but if there's a more elegant solution to be found by modifying the PHP in the snippet, I'd love it. :)

Hi. That didn't work at first but I added !important to the style and it works now.

Awesome :)

This archived topic is closed to new replies.