Tagged: social icons
-
AuthorPosts
-
September 10, 2014 at 7:05 am #316322
My client is not on Twitter but on LinkedIn, so I’d like to replace the Twitter Icon and Link in the footer “interesting links” widget with the respective LinkedIn icon and link.
I know that I could just use a blank text widget and put in the necessary code, plus manually upload a linkedIn icon to the media library, but I’d like to think the more elegant solution would be modifing and using the widget that’s already there.
How would I go about that? Maybe I overlooked it, but I couldn’t find a widget.php anywhere in the folder structure.Maybe for future updates it would be a good idea to offer an alternative for the small social icons row above the navigation at the top of the page for the footer area? Or consider that people might want to mix and match their own interesting social links? For example, fewer users use the RSS feed today or even know what the icon stands for.
September 10, 2014 at 2:14 pm #316571Hi e13kiki!
Please go to Enfold/framework/php folder and open class-framework-widgets.php file and find
function widget($args, $instance) { // prints the widget extract($args, EXTR_SKIP); $twitter = empty($instance['twitter']) ? '' : $instance['twitter']; $rss = empty($instance['rss']) ? '' : $instance['rss']; $rss = preg_replace('!https?:\/\/feeds.feedburner.com\/!','',$rss); if(!empty($twitter) || !empty($rss)) { $addClass = "asc_multi_count"; if(!isset($twitter) || !isset($rss)) $addClass = 'asc_single_count'; echo $before_widget; $output = ""; if(isset($twitter)) { $link = 'http://twitter.com/'.$twitter.'/'; $before = apply_filters('avf_social_widget', "", 'twitter'); $output .= "<a href='$link' class='asc_twitter $addClass'>{$before}<strong class='asc_count'>".__('Follow','avia_framework')."</strong><span>".__('on Twitter','avia_framework')."</span></a>"; }
and change it to
function widget($args, $instance) { // prints the widget extract($args, EXTR_SKIP); $twitter = empty($instance['linkedin']) ? '' : $instance['linkedin']; $rss = empty($instance['rss']) ? '' : $instance['rss']; $rss = preg_replace('!https?:\/\/feeds.feedburner.com\/!','',$rss); if(!empty($linkedin) || !empty($rss)) { $addClass = "asc_multi_count"; if(!isset($linkedin) || !isset($rss)) $addClass = 'asc_single_count'; echo $before_widget; $output = ""; if(isset($linkedin)) { $link = 'http://linkedin.com/'.$linkedin.'/'; $before = apply_filters('avf_social_widget', "", 'linkedin'); $output .= "<a href='$link' class='asc_linkedin $addClass'>{$before}<strong class='asc_count'>".__('Follow','avia_framework')."</strong><span>".__('on LinkedIn','avia_framework')."</span></a>"; }
Regards,
YigitNovember 16, 2016 at 7:03 pm #713131… I have the same question. But how can I do this in Child Function?
November 16, 2016 at 7:42 pm #713165Hey!
You can simply paste the code to the child theme functions, it should have any issue to work!
Let us know and we will help further if needed
Best regards,
BasilisNovember 16, 2016 at 7:46 pm #713167Hi,
Please copy unmodified enfold/framework/php/class-framework-widgets.php file and paste it inside enfold-child folder. Open the file and find following at the top and remove it (please do not remove PHP opening tag)
if ( ! defined('AVIA_FW')) exit('No direct script access allowed');
and then add following code to Functions.php file of your child theme
require( 'class-framework-widgets.php' );
Best regards,
YigitNovember 17, 2016 at 4:47 pm #713637hey thanks for answering!
If I put the function in the child function.php (like Basisis recommented) – I will get a white screen!
Also if I do it like Yigit says – a white screen!The simpliest way would be just copying the rendered HTML:
<section id="avia_socialcount-3" class="widget clearfix avia_socialcount"> <a href="#" class="asc_twitter asc_multi_count"><br> <span class="social_widget_icon" aria-hidden="true" data-av_icon="" data-av_iconfont="entypo-fontello"></span><br> <strong class="asc_count">Folgen</strong><span>auf Twitter</span></a><p></p> <p><a href="#" class="asc_rss asc_multi_count"><span class="social_widget_icon" aria-hidden="true" data-av_icon="ue801" data-av_iconfont="entypo-fontello"></span><strong class="asc_count">Abonnieren</strong><span>den RSS Feed</span></a><br> <span class="seperator extralight-border"></span><br> </p></section>
… and change the icons. But I don´t know how to change them? Do you have an idea?
November 17, 2016 at 4:57 pm #713646 -
AuthorPosts
- You must be logged in to reply to this topic.