Viewing 5 posts - 1 through 5 (of 5 total)
  • Posted in: Dante
  • #35042
    jovo
    Member
    Post count: 63

    Hello. Is it possible to replace the current mobile menu icon with a different icon. I prefer the standard Font Awesome icon called “fa-bars”. This icon (fa bars-hamburger icon) doesn’t include the surrounding border and for me, it just looks cleaner. Thanks for your help!

    #35314
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi there,

    Sure, you can change this if you like, just add the following to your child theme functions.php file:

    		function sf_logo($logo_class) {
    			
    			//VARIABLES
    			global $woocommerce;
    			$options = get_option('sf_dante_options');
    			$show_cart = $options['show_cart'];
    			$logo = $retina_logo = "";
    			if (isset($options['logo_upload'])) {
    			$logo = $options['logo_upload'];
    			}
    			if (isset($options['retina_logo_upload'])) {
    			$retina_logo = $options['retina_logo_upload'];
    			}
    			if ($retina_logo == "") {
    			$retina_logo = $logo;
    			}
    			$logo_output = "";		
    			$logo_alt = get_bloginfo( 'name' );
    			$logo_link_url = home_url();
    			
    			
    			// LOGO OUTPUT
    			$logo_output .= '<div id="logo" class="'.$logo_class.' clearfix">'. "\n";
    			$logo_output .= '<a href="'.$logo_link_url.'">'. "\n";
    			if ($logo != "") { 
    			$logo_output .= '<img class="standard" src="'.$logo.'" alt="'.$logo_alt.'" />'. "\n";
    			} else {
    			$logo_output .= '<h1 class="standard">'.$logo_alt.'</h1>'. "\n";
    			}
    			if ($retina_logo != "") {
    			$logo_output .= '<img class="retina" src="'.$retina_logo.'" alt="'.$logo_alt.'" />'. "\n";
    			} else {
    			$logo_output .= '<h1 class="retina">'.$logo_alt.'</h1>'. "\n";
    			}
    			$logo_output .= '</a>'. "\n";
    			$logo_output .= '<a href="#" class="visible-sm visible-xs mobile-menu-show"><i class="fa-bars"></i></a>'. "\n";
    			if ($show_cart && $woocommerce != "") {
    			$logo_output .= '<a href="'.$woocommerce->cart->get_cart_url().'" class="visible-sm visible-xs mobile-cart-link"><i class="ss-cart"></i></a>'. "\n";
    			}
    			$logo_output .= '</div>'. "\n";
    			
    			
    			// LOGO RETURN		
    			return $logo_output;
    		}

    Hope that helps.

    – Ed

    #37022
    Togel1
    Member
    Post count: 9

    Hi,

    I did as you told but nothing happens… What´s next after adding the code to the functions.php in child theme?

    Tom

    #37031
    jovo
    Member
    Post count: 63

    Hi Ed. If I’m not using a child theme, can I simply edit my functions.php file?

    Would be great if you could make the icon selectable as an Admin option. Thanks.

    #37328
    Tahir – SUPPORT
    Member
    Post count: 1212

    Hi


    @Togel1
    Please clear your browser cache and check. Also if you have a cache plugin installed you will have to clear the server cache as well for the changes to appear.


    @jovo
    Yes you can change it in functions.php but we recommend using the child theme since any changes you make to the theme files will be overwritten if you update the theme .

    Thanks
    Tahir

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register