Viewing 26 posts - 1 through 26 (of 26 total)
  • Author
    Posts
  • #303575

    Ref: https://kriesi.at/support/topic/replacing-or-adding-a-custom-icon/

    Hi Enfold Team

    I searched and found a post regarding this issue however it was never resolved and I am facing the same issue the previous poster faced.

    I do not see:

    $html .= "<a {$blank} href='".$icon['social_icon_link']."' class='avia-font-entypo-fontello'>".$avia_config['font_icons'][$icon['social_icon']]."</a>";

    in

    ‘helper-social-media.php’

    to replace with

    if($icon['social_icon'] == 'rss'){
    $html .= "<a><img src='http://mywebsite.com/image.jpg' alt='' /></a>";
    }else{
    $html .= "<a>".$avia_config['font_icons'][$icon['social_icon']]."</a>";
    } 

    I am trying to create a simple cart button that links to /cart – I like the idea of replacing an RSS icon (which I won’t be using) with the Entypo cart icon, linking internally to the cart page.

    I truly appreciate all of the help and support you have already provided via this forum and look forward to hearing back from you.
    M

    • This topic was modified 9 years, 10 months ago by Yigit.
    #304057

    Hey!

    Where do you want to put this button? can you please post a link to your website?

    Best regards,
    Josue

    #304124

    Hi Josue

    I placed the link to the site in the original post under Private Data.

    Again, I am looking to replace a social icon with a cart icon in the social icon mini ‘top’ header.

    In order to make it clearer, I have attached a photo to help explain.

    </img>

    Thanks!
    M

    #304134

    Hey!

    Try adding this at the very end of your theme functions.php file:

    function avia_add_custom_icon($icons) {
    	$icons['cart']	 = array( 'font' =>'entypo-fontello', 'icon' => 'ue859');
    	return $icons;
    }
    add_filter('avf_default_icons','avia_add_custom_icon', 10, 1);
    
    function avia_add_custom_social_icon($icons) {
    	$icons['Cart'] = 'cart';
    	return $icons;
    }
    add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);

    Then, you’ll have this option available here:

    Cheers!
    Josue

    #304135

    Hi Josue

    I added

    
    function avia_add_custom_icon($icons) {
    	$icons['cart']	 = array( 'font' =>'entypo-fontello', 'icon' => 'ue859');
    	return $icons;
    }
    add_filter('avf_default_icons','avia_add_custom_icon', 10, 1);
    
    function avia_add_custom_social_icon($icons) {
    	$icons['Cart'] = 'cart';
    	return $icons;
    }
    add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);
    
    

    but received the following error:

    Parse error: syntax error, unexpected ‘&’, expecting ‘]’ in /home/content/p3nexnas06_data02/13/2173913/html/wp-content/themes/enfold/functions.php on line 506

    According to Coda, line 506 is:
    `
    $icons[‘cart’] = array( ‘font’ =>’entypo-fontello’, ‘icon’ => ‘ue859’);

    Thoughts?

    • This reply was modified 10 years, 3 months ago by moprosk. Reason: syntax
    #304137

    Hi,

    Can you please create me an administrator account? post it here as a private reply.

    Regards,
    Josue

    #304227
    This reply has been marked as private.
    #304229
    #304240
    This reply has been marked as private.
    #304251

    It’s done, review your site.

    #304257

    Great, thanks!

    May I ask what the solution ended up being?

    Thanks again.
    M

    #304261

    Hey!

    I added the code in Plugins > Edit Functions.

    Cheers!
    Josue

    #304644

    Perfectly and fully resolved. Amazingly fast and thorough help. Thanks!
    M

    #304657

    You are welcome, always glad to help :)

    Regards,
    Josue

    #350533

    Trying to do the same, but no luck. Did this process change for Enfold 3.0.2?

    #351129

    Hey!

    You can use the same filter:

    function avia_add_custom_icon($icons) {
    	$icons['cart']	 = array( 'font' =>'entypo-fontello', 'icon' => 'ue859');
    	return $icons;
    }
    add_filter('avf_default_icons','avia_add_custom_icon', 10, 1);
    
    function avia_add_custom_social_icon($icons) {
    	$icons['Cart'] = 'cart';
    	return $icons;
    }
    add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);

    Place it below this code:

    if(isset($avia_config['use_child_theme_functions_only'])) return;
    

    Best regards,
    Ismael

    #352687

    Great! Thanks,

    1) One issue. The custom icon I created for Vine shares the same icon ID as the music note ue800 and so the music note appears as the icon. Is there an override?

    2) How do I add the color hover fx (i.e. #00bf8f for the background color on hover).

    3) If i wanted to add a 2nd custom icon, what do I need to add to the code above?

    Thank you!

    #352706

    Hi!

    Can you paste the code you are using?

    Regards,
    Josue

    #352715
    function avia_add_custom_icon($icons) {
    	$icons['vine']	 = array( 'font' =>'entypo-fontello', 'icon' => 'ue800');
    	return $icons;
    }
    add_filter('avf_default_icons','avia_add_custom_icon', 10, 1);
    
    function avia_add_custom_social_icon($icons) {
    	$icons['Vine'] = 'vine';
    	return $icons;
    }
    add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);
    #352720

    Hey!

    Afaik Vine icon is not available in Entypo, are you importing a custom font too? if that’s the case you need to change this line accordingly:

    $icons['vine']	 = array( 'font' =>'entypo-fontello', 'icon' => 'ue800');
    

    To:

    $icons['vine']	 = array( 'font' =>'custom-font-name', 'icon' => 'ue800');
    

    Regards,
    Josue

    #352806

    yes and that worked!

    what about adding the custom bg color on hover?

    thanks for the great support as always!

    #352831

    Hi!

    Try with this code:

    #top #wrap_all .av-social-link-vine:hover a{color:#fff; background-color:#37589b; }
    

    Regards,
    Josue

    #367094

    I think this broke in Enfold 3.0.4. The Vine icon no longer displays, rather there is a blank space in it’s spot.

    • This reply was modified 9 years, 11 months ago by codemode.
    #367424

    Hi!

    Check to make sure your font file is still uploaded in Dashboard > Enfold > Import/Export and then send us a WordPress login so we can take a look.

    Also be sure to deactivate all plugins while testing.

    Best regards,
    Elliott

    #375463

    Wanting to add the Houzz icon to the header. How do I add this custom icon? Fontello has the Houzz icon available. I’ve added the code from the previous steps with no luck. I’m sure I’m missing a step.

    #375466

    Nevermind. Finally figured it out.

Viewing 26 posts - 1 through 26 (of 26 total)
  • The topic ‘Custom Social Bar Icons (Replace/Add) [Enfold]’ is closed to new replies.