- This topic has 45 replies, 3 voices, and was last updated 7 years, 5 months ago by
Tom.
-
AuthorPosts
-
February 13, 2018 at 7:39 pm #495794
elsa
Hi,
How to set different color for specific page of mobile menu and mobile header color. Thanks.February 13, 2018 at 9:15 pm #495836Leo
StaffCustomer SupportHi there,
Can you guide me to the page you are referring to so I can give you the code?
Let me know.
February 13, 2018 at 9:39 pm #495842elsa
Hi Leo,
https://spruceupspace.com; and
https://spruceupspace.com/kidsThanks so much.
February 14, 2018 at 6:04 am #496073Leo
StaffCustomer SupportActually I’m not sure the how many colors you want to change but all the menu CSS are here: https://docs.generatepress.com/article/changing-navigation-colors/
You just have to wrap it with media query so it’s mobile only:
https://docs.generatepress.com/article/responsive-display/#responsive-breakpointsAs for page specific, if you use Tom’s Simple CSS plugin, it gives you a CSS metabox each page so the CSS in there are page specific.
February 14, 2018 at 2:33 pm #496647elsa
Hi Leo,
Which CSS Plugin is it?February 14, 2018 at 7:35 pm #496832Leo
StaffCustomer SupportFebruary 18, 2018 at 2:55 am #499359elsa
Hi Leo,
Thanks for your help, it’s working! What about product category page, I can’t seem to edit the style with CSS plugin. How to enable it in category archive page?February 18, 2018 at 7:04 am #499563Leo
StaffCustomer SupportYeah those are index pages (blog, archive) so metabox won’t work.
If you are wanting all category pages to, then add
.category
in front of the selector, like this for example:.category .main-navigation .main-nav ul li a, .category .main-navigation .menu-toggle { color: #FFFFFF; }
February 18, 2018 at 9:36 pm #499899elsa
Hi Leo,
How to select particular category page such as category “KIDS” only? Thanks.February 18, 2018 at 9:55 pm #499911Leo
StaffCustomer SupportTry
.category-kids
February 18, 2018 at 10:15 pm #499915elsa
Would you help me to give conditional tag for this, as this for several categories? thanks.
February 18, 2018 at 11:40 pm #499941elsa
Never mind, I’ve found a way. Thanks!
February 19, 2018 at 1:55 am #500007elsa
Hi Leo,
Turns out I can’t resolve this. So I add this snippet but didn’t work. How to make it right?function mytheme_styles_scripts() {
if ( is_page( ‘Kids’ ) || is_product_category( ‘Kids’ ) || has_term (‘kids’, ‘product_cat’))
{
wp_enqueue_style( ‘kids’, get_template_directory_uri() .’/Custom Junita/Kids.css’,false,null,’all’);
}
}//hook the function to wp_enqueue_scripts action hook
add_action( ‘wp_enqueue_scripts’, ‘mytheme_styles_scripts’ );February 19, 2018 at 7:40 am #500263Leo
StaffCustomer SupportHmm you don’t need the snippet to change the mobile menu and mobile header color on category pages.
February 19, 2018 at 11:26 pm #500844elsa
Hi Leo,
The different page will be more than 200 pages out of 400. So if I insert CSS one by one, it will be lots of hassle. Please help to resolve this. Here’s my code.function mytheme_styles_scripts() {
wp_register_style( ‘kids’, trailingslashit( get_stylesheet_directory_uri() ).’kids.css’,__FILE__);
}if ( is_page( ‘Kids’ ) || is_product_category( ‘Kids’ ) || has_term (‘kids’, ‘product_cat’)) {
wp_enqueue_style( ‘kids’);
}
//hook the function to wp_enqueue_scripts action hook
add_action( ‘wp_enqueue_scripts’, ‘mytheme_styles_scripts’ ); -
AuthorPosts
- You must be logged in to reply to this topic.