Resolvedmobie icon color change
- This topic has 3 replies, 2 voices, and was last updated 1 year, 6 months ago by
luukkaass.
Viewing 4 posts - 1 through 4 (of 4 total)
- AuthorPosts
- March 20, 2022 at 11:23 am #33351
luukkaass
ParticipantHi it is possible o change color of these icons ?
Thank you
Lukas
March 20, 2022 at 11:49 am #33352stefanioancretu
Participant@media only screen and (max-width: 768px){
#header .lafka-top-bar-message span.lafka-top-bar-phone a:before {
background-color: #000!important;
}a.mob-menu-toggle i{
background-color: #000;
}
}March 20, 2022 at 12:44 pm #33353stefanioancretu
ParticipantOr if u want to use color picker, install Code snippets and add new snippet
// Customize appearance options for toggle menu button and phone button on mobile function menu_and_phone_buttons_style( $wp_customize ) { $wp_customize->add_setting('menu_button_background_color', array( 'default' => '#f2002d', 'transport' => 'refresh', )); $wp_customize->add_setting('menu_button_background_hover_color', array( 'default' => '#333333', 'transport' => 'refresh', )); $wp_customize->add_setting('menu_button_color', array( 'default' => '#ffffff', 'transport' => 'refresh', )); $wp_customize->add_setting('phone_button_background_color', array( 'default' => '#a1ba32', 'transport' => 'refresh', )); $wp_customize->add_setting('phone_button_color', array( 'default' => '#ffffff', 'transport' => 'refresh', )); $wp_customize->add_section('menu_phone_styles_section', array( 'title' => __('Mobile phone and menu styles', 'Lafka'), 'priority' => 30, )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'menu_button_background_color_control', array( 'label' => __('Toggle menu background color', 'Lafka'), 'section' => 'menu_phone_styles_section', 'settings' => 'menu_button_background_color', ) ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'menu_button_background_hover_color_control', array( 'label' => __('Toggle menu background hover color', 'Lafka'), 'section' => 'menu_phone_styles_section', 'settings' => 'menu_button_background_hover_color', ) ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'menu_button_color_control', array( 'label' => __('Toggle menu color', 'Lafka'), 'section' => 'menu_phone_styles_section', 'settings' => 'menu_button_color', ) ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'phone_button_background_color_control', array( 'label' => __('Phone button background color', 'Lafka'), 'section' => 'menu_phone_styles_section', 'settings' => 'phone_button_background_color', ) ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'phone_button_color_control', array( 'label' => __('Phone button color', 'Lafka'), 'section' => 'menu_phone_styles_section', 'settings' => 'phone_button_color', ) ) ); } add_action('customize_register', 'menu_and_phone_buttons_style'); // Output CSS in head function output_menu_and_phone_css() { ?> <style type="text/css"> @media only screen and (max-width: 768px){ #header .lafka-top-bar-message span.lafka-top-bar-phone a:before { background-color: <?php echo get_theme_mod('phone_button_background_color'); ?>!important; color:<?php echo get_theme_mod('phone_button_color'); ?>!important; } a.mob-menu-toggle i{ background-color:<?php echo get_theme_mod('menu_button_background_color'); ?>; color: <?php echo get_theme_mod('menu_button_color'); ?>; } a.mob-menu-toggle:hover i{ background-color:<?php echo get_theme_mod('menu_button_background_hover_color'); ?>; } } </style> <?php } add_action('wp_head', 'output_menu_and_phone_css');
After add this, you can select colors from customizer -> ‘Mobile phone and menu styles’
March 20, 2022 at 2:39 pm #33354luukkaass
ParticipantGreat thank you
- AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in and have valid license to reply to this topic.