Site logo

Archived topic

add sth before sticky-navigation

6 replies · Started by shwebteam on February 23, 2017

Viewing posts 1–7 of 7

Hi there,
we are trying to put a wrapper around the navigation by using the gp hooks
which is working just fine until you scroll down because we have
the sticky navigation option activated.
How can we add html tags before the sticky-navigation or add a class inside the sticky navigation?
(without using javascript / jquery)

regards

Hi there,

Not quite sure what you meant? Can you show us what you have so far or the result you are trying to achieve?

Let us know.

The Fade and Slide transitions clone the navigation element, which would explain why it's not bringing the wrapper along with it.

What are you trying to accomplish with the wrapper?

Yes Tom, thats exactly what I meant.
We would put the wrapper only on certain pages (woocommerce)
in order to give certain navigation items a different style.
However we have solved this with jQuery for now and it seems to be working fine.
(but if possible we would like to avoid tweaks like these)

Screenshot Source

Individual pages and pages like WooCommerce has a class in the <body> element you can use.

For example, all pages would use this selector:

#site-navigation

But only WooCommerce pages would use this selector:

.woocommerce #site-navigation

thanks !
that is indeed a better way to do it
somehow we have overlooked this selector ^^

No problem :)

This archived topic is closed to new replies.