Viewing 30 posts - 1 through 30 (of 53 total)
  • Author
    Posts
  • #214278

    Hello

    I have looked at a number of posts and tried the code from one to replace the entypo-fontello icon for the small device toggle button with 2 pngs (one for open and one for closed) that didn’t work; I’d be happy to replace the current one…

    data-av_icon=”” data-av_iconfont=”entypo-fontello”>

    …with the simple 3 horizontal bands instead –


    U+2630

    but I would also be interested in swapping out the font with a png instead. Please let me know how to go about both options, if that is not too much trouble. Thank you :)

    #215048

    Hey webWahine!

    Kriesi doesn’t use an icon for the toggle symbol but just some css code. If you want to replace it with an icon open up wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/toggles.php and search for

    
    <span class="vert_icon"></span><span class="hor_icon"></span>
    

    Replace this code with an html img tag ( http://www.w3schools.com/tags/tag_img.asp ) which points to your icon.

    Cheers!
    Peter

    #215491

    Mmmm, I’m a bit confused because when I inspect the element it and turn off the font-family in the styles the icon changes to a rectangle; see my screen shot here for what I am inspecting:

    Fontello screenshot

    Also, I changed line 216 in toggles.php to this:

    $output .= ‘ toggle icon</p>’;

    and it didn’t change the icon. Please advise; I’m also curious as to where the css is for this, please, I assume for ‘vert_icon’ and ‘hor_icon’. Thanks again! :)

    #215504

    Sorry, i didn’t wrap the code in code tags –
    $output .= ' <img src="http://topaz.parkhomes.ca/images/toggleIcon.png" alt="toggle icon"></p>';

    #216274

    Hi!

    Ah – yes. I thought you mean the toggle/accordion shortcode symbol :)

    If you want to replace the menu toggle icon open up functionsphp and search for:

    
    'mobile_menu'	=> array( 'font' =>'entypo-fontello', 'icon' => 'ue8a5'),
    

    Replace ue8a5 with your char code and change the font family if necessary (i.e. if you want to use a icon from a custom fontello.com icon set).

    Cheers!
    Peter

    #216603

    Thanks, Peter, but when I go here to look at the char codes:

    The one that is currently in Enfold is noted as this: U+E005 
    But in your code it’s described as this: ‘ue8a5’
    I want to use the simple ‘list’ icon, noted as this: U+2630 ☰
    So how did you get the ue8a5? I don’t know what to replace it with because there doesn’t seem to be any obvious connection on their char code page with your font icon id. Thanks again; sorry to be a pest :)

    #216850

    Hey!

    Try to replace this line in functions-enfold.php

    
    $items .= '<li id="menu-item-search" class="noMobile menu-item menu-item-search-dropdown"><a href="?s=" rel="nofollow" data-avia-search-tooltip="'.$form.'" '.av_icon_string('search').'></a></li>';
    

    with

    
    $items .= '<li id="menu-item-search" class="noMobile menu-item menu-item-search-dropdown"><a href="?s=" rel="nofollow" data-avia-search-tooltip="'.$form.'">&#9776;</a></li>';
    

    If the code doesn’t work try the hex values here: http://www.fileformat.info/info/unicode/char/2630/index.htm – you need to replace ☰ with the hex value

    Regards,
    Peter

    #217097

    Ok, that wasn’t quite it, sorry. The code did change an icon but it changed the search icon, not the mobile toggle icon. Could you please tell me where the code is for the toggle? If I could just figure out what to replace ue8a5 with the equivalent for the list icon in the line, below, we’d be all set! :)

    'mobile_menu' => array( 'font' =>'entypo-fontello', 'icon' => 'ue8a5'),

    • This reply was modified 10 years, 10 months ago by webWahine.
    #217110

    Hi!

    Yes – my bad. I shouldn’t try to answer several threads simultaneously :)

    Revert the change and open up header.php. Then replace

    
                	echo '<a id="advanced_menu_toggle" href="#" '.av_icon_string('mobile_menu').'></a>';
    	    		echo '<a id="advanced_menu_hide" href="#" 	'.av_icon_string('close').'></a>';
    

    with

    
                	echo '<a id="advanced_menu_toggle" href="#">&#9776;</a>';
    	    		echo '<a id="advanced_menu_hide" href="#">&#9776;</a>';
    

    Cheers!
    Peter

    #253529

    “a id=”advanced_menu_toggle” Not found in header.php!!!!

    #253805

    Hey!


    @wintner
    : Sorry about that. If you have the latest version of the theme, you can find most of the header codes on includes > helper-main-menu.php. I hope it helps.

    Best regards,
    Ismael

    #256391

    OK Ive replaced the code but the font isn’t loading! Where is the font specified?

    #256551

    Hi!

    Thank you for using the support forum!

    You can change the mobile icon character code on functions.php. Look for the mobile char codes for example on line 223:

    'mobile_menu'	=> array( 'font' =>'entypo-fontello', 'icon' => 'ue8a5'),
    

    Create a page then insert an Icon element, find the character codes by hovering over the icons:

    We’ll use the char code on the example above but we’ll remove the backslash.

    'mobile_menu'	=> array( 'font' =>'entypo-fontello', 'icon' => 'ue809'),
    

    I hope that helps.

    Cheers!
    Ismael

    #256616

    Doesnt work.

    #257274

    Ismael, I have tried each of the team members in this threads instructions and none work for me.

    Using your code, the old icon still loads.

    #258119

    Hey!

    Did you check the “font-family” value? In Ismael’s code it’s “entypo-fontello” but it may vary if you want to use a custom icon from another font set. If the icon is part of another font-family you must change this value too.

    Cheers!
    Peter

    #258299

    No, Dude, I am trying to load a entypo-fontello character.

    #259039

    Hey!

    Try going through the steps again. I just tested this with 2.7 by changing the value in the enfold functions.php to get the three lines code instead of the default one:
    'mobile_menu' => array( 'font' =>'entypo-fontello', 'icon' => 'ue811')

    Cheers!
    Devin

    #259528

    That’s what I have:
    $avia_config[‘font_icons’] = apply_filters(‘avf_default_icons’, array(
    ‘mobile_menu’ => array( ‘font’ =>’entypo-fontello’, ‘icon’ => ‘ue811’),
    ));

    But the other icon loads even with cache disabled.

    #260367

    If you are using a *child theme* then just adding in the same thing that is in the parent function doesn’t work. You need to use a function to tell the theme there is a replacement of that array: http://kriesi.at/documentation/enfold/change-icon-used-for-standard-theme-elements/

    #278042

    Hello!

    I am trying to change the search symbol to a png. It doesn’t have to toggle or anything. How do I do that?

    #278171

    Hey!

    Try adding this code to the Quick CSS:

    #menu-item-search a:before {
        content: url(_IMAGE_URL_HERE_) !important;
    }

    Cheers! 
    Josue

    #278547

    Perfect! Thank you!

    #278548

    Which class do I edit to push it down a little bit?

    #278645

    Try changing the code to:

    #menu-item-search a:before {
        content: url(_IMAGE_URL_HERE_) !important;
        position: relative;
        top: 3px;
    }

    Best regards,
    Josue

    #435853

    Speaking of adding this to a child theme functions.php, I added the code below and it seems to work. Replaced list icon with hamburger icon. Does this look correct? Just wanted to double check my coding. Thank you.

    add_filter('avf_default_icons','avia_replace_mobile_menu_icon', 10, 1);
    
    function avia_replace_mobile_menu_icon($icons)
    {
    $icons['mobile_menu']	 = array( 'font' =>'entypo-fontello', 'icon' => 'ue811');
    return $icons;
    }
    #436181

    Hi!

    Yes, your code looks fine :)

    Cheers!
    Yigit

    #508005

    Hei,

    So the same thing i need to chage some default charsets. in example of the star icon.
    I is the “ue808”

    In the functions calld supersticky? Whiy is my code not working???

    HELP!!!!

    add_action('init', function() {
    	global $avia_config;
    	//$avia_config['font_icons']['mobile_menu']['icon'] = 'ue824';
    	$avia_config['font_icons']['supersticky']['icon'] = 'ue824';
    	return $avia_config;
    });
    
    #508067

    Hi @hunter74!

    What are you trying to do exactly?

    Best regards,
    Josue

    #508196

    I tried to give the fontello font icons a different code via the fontello Website – (not working) U+e808

    Exactly i want to change the charcode of the star icon

    ue808

    Because my Icon has the same code

Viewing 30 posts - 1 through 30 (of 53 total)
  • The topic ‘Replace toggle icon with another entypo-fontello font OR use a png’ is closed to new replies.