- This topic has 7 replies, 2 voices, and was last updated 3 years, 7 months ago by
Leo.
-
AuthorPosts
-
October 13, 2018 at 9:07 am #700199
Federico
Hi everyone!
I hope someone can help me. How can I customize sticky menu in page headers? I would like to create differently colored sticky menus for different pages. Is it possible? How can I do it?
thanks a lot in advance for your help.
bye!
GP Premium 1.7.2October 13, 2018 at 9:39 am #700207Leo
StaffCustomer SupportHi there,
You will have to use CSS for this with the page ID like this:
.page-id-xx .main-navigation.navigation-stick { background-color: #ffffff; }
Adding CSS: https://docs.generatepress.com/article/adding-css/
I should also mention that Page Header module has been replaced with our newest add-on Header Element/Page Hero so itโs definitely a good idea to migrate them over.
See more info here:
https://docs.generatepress.com/article/header-element-overview/
https://docs.generatepress.com/article/moving-hooks-page-headers-to-elements/Let me know if this helps ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 13, 2018 at 10:08 pm #700460Federico
Hi,
Thanks Leo, I resolved adopting the solution you suggested.
But I have one more question… I noticed that menu navigation colors created in different page headers don’t appear in mobile version of the site. It always appears the default primary navigation customization. How can I create differently colored sticky menus for different pages with page headers ALSO ON MOBILE?
Thank you again for your help.
October 14, 2018 at 10:16 am #700795Leo
StaffCustomer SupportNot quite sure what you mean?
The CSS I provided should only change on sticky navigation which you aren’t using on mobile.
The current mobile header color is from Customizer > colors > Primary Navigation.
Let me know if this helps ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 15, 2018 at 2:49 am #701151Federico
I apologize for my english, Leo.
I meant that different colors of different page headers’ menu navigation are not visible on mobile, but only on desktop.
Examples:
menu navigation of page header 1 is red on desktop, but is black on mobile (instead I wish it was red)
menu navigation of page header 2 is green on desktop, but is black on mobile (instead I wish it was green)
menu navigation of page header 3 is yellow on desktop, but is black on mobile….and so on.
If I set the current mobile header color from Customizer > colors > Primary Navigation as you suggested, it’ll change in all page headers, while I want different colors for different page headers.
I hope I have explained well.
Thanks a lot again.
October 15, 2018 at 9:30 am #701477Leo
StaffCustomer SupportTo change the navigation color on mobile for individual page, try CSS like this:
@media (max-width: 768px) { .page-id-xx .main-navigation { backgrounc-color: #000; } }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 16, 2018 at 6:40 am #702145Federico
Now all is ok! Thanks a lot Leo for your support.
October 16, 2018 at 9:22 am #702412Leo
StaffCustomer SupportNo problem ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.