-
AuthorPosts
-
August 13, 2014 at 3:58 am #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.
August 13, 2014 at 11:12 pm #304057Hey!
Where do you want to put this button? can you please post a link to your website?
Best regards,
JosueAugust 14, 2014 at 2:48 am #304124Hi 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!
MAugust 14, 2014 at 4:12 am #304134Hey!
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!
JosueAugust 14, 2014 at 4:20 am #304135Hi 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
August 14, 2014 at 4:25 am #304137Hi,
Can you please create me an administrator account? post it here as a private reply.
Regards,
JosueAugust 14, 2014 at 8:18 am #304227This reply has been marked as private.August 14, 2014 at 8:23 am #304229August 14, 2014 at 8:57 am #304240This reply has been marked as private.August 14, 2014 at 9:45 am #304251It’s done, review your site.
August 14, 2014 at 9:55 am #304257Great, thanks!
May I ask what the solution ended up being?
Thanks again.
MAugust 14, 2014 at 9:58 am #304261Hey!
I added the code in Plugins > Edit Functions.
Cheers!
JosueAugust 15, 2014 at 12:28 am #304644Perfectly and fully resolved. Amazingly fast and thorough help. Thanks!
MAugust 15, 2014 at 1:01 am #304657You are welcome, always glad to help :)
Regards,
JosueNovember 13, 2014 at 1:14 am #350533Trying to do the same, but no luck. Did this process change for Enfold 3.0.2?
November 14, 2014 at 5:31 am #351129Hey!
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,
IsmaelNovember 17, 2014 at 9:15 pm #352687Great! 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!
November 17, 2014 at 10:17 pm #352706Hi!
Can you paste the code you are using?
Regards,
JosueNovember 17, 2014 at 10:47 pm #352715function 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);
November 17, 2014 at 10:56 pm #352720Hey!
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,
JosueNovember 18, 2014 at 1:33 am #352806yes and that worked!
what about adding the custom bg color on hover?
thanks for the great support as always!
November 18, 2014 at 5:05 am #352831Hi!
Try with this code:
#top #wrap_all .av-social-link-vine:hover a{color:#fff; background-color:#37589b; }
Regards,
JosueDecember 12, 2014 at 2:05 am #367094I 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.
December 12, 2014 at 7:04 pm #367424Hi!
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,
ElliottJanuary 6, 2015 at 4:46 am #375463Wanting 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.
January 6, 2015 at 5:03 am #375466Nevermind. Finally figured it out.
-
AuthorPosts
- The topic ‘Custom Social Bar Icons (Replace/Add) [Enfold]’ is closed to new replies.