In order to change the icon images, you need to replace the default .png files with new .png files having the same names under the wp-contentthemestheme####imagesicons folder on your FTP.
In order to make the links open in a new window,
1 | <a class = "social_link social_link__<?php echo strtolower($network); ?>" rel= "tooltip" data-original-title= "<?php echo strtolower($network); ?>" href= "<?php echo $networks[$network]['link']; ?>" > |
1 | <a class = "social_link social_link__<?php echo strtolower($network); ?>" rel= "tooltip" data-original-title= "<?php echo strtolower($network); ?>" href= "<?php echo $networks[$network]['link'] ; ?>" target= "_blank" > |
In order to add a new social media icon, for instance one for Picasa (you will just need to change “Picasa” and “picasa” in the lines of this tutorial if you are going to add a different button, like “Lastfm”/”lastfm”, “Tumblr”/”tumblr” etc):
1 2 3 4 5 6 7 | $networks [ 'Twitter' ][ 'link' ] = $instance [ 'twitter' ]; $networks [ 'Facebook' ][ 'link' ] = $instance [ 'facebook' ]; $networks [ 'Flickr' ][ 'link' ] = $instance [ 'flickr' ]; $networks [ 'Feed' ][ 'link' ] = $instance [ 'feed' ]; $networks [ 'Linkedin' ][ 'link' ] = $instance [ 'linkedin' ]; $networks [ 'Delicious' ][ 'link' ] = $instance [ 'delicious' ]; $networks [ 'Youtube' ][ 'link' ] = $instance [ 'youtube' ]; |
add
1 | $networks [ 'Picasa' ][ 'link' ] = $instance [ 'picasa' ]; |
1 2 3 4 5 6 7 | $networks [ 'Twitter' ][ 'label' ] = $instance [ 'twitter_label' ]; $networks [ 'Facebook' ][ 'label' ] = $instance [ 'facebook_label' ]; $networks [ 'Flickr' ][ 'label' ] = $instance [ 'flickr_label' ]; $networks [ 'Feed' ][ 'label' ] = $instance [ 'feed_label' ]; $networks [ 'Linkedin' ][ 'label' ] = $instance [ 'linkedin_label' ]; $networks [ 'Delicious' ][ 'label' ] = $instance [ 'delicious_label' ]; $networks [ 'Youtube' ][ 'label' ] = $instance [ 'youtube_label' ]; |
add
1 | $networks [ 'Picasa' ][ 'label' ] = $instance [ 'picasa_label' ]; |
1 | <?php foreach ( array ( "Facebook" , "Twitter" , "Flickr" , "Feed" , "Linkedin" , "Delicious" , "Youtube" ) as $network ) : ?> |
To
1 | <?php foreach ( array ( "Facebook" , "Twitter" , "Flickr" , "Feed" , "Linkedin" , "Delicious" , "Youtube" , "Picasa" ) as $network ) : ?> |
1 2 3 4 5 6 7 | $instance [ 'twitter' ] = $new_instance [ 'twitter' ]; $instance [ 'facebook' ] = $new_instance [ 'facebook' ]; $instance [ 'flickr' ] = $new_instance [ 'flickr' ]; $instance [ 'feed' ] = $new_instance [ 'feed' ]; $instance [ 'linkedin' ] = $new_instance [ 'linkedin' ]; $instance [ 'delicious' ] = $new_instance [ 'delicious' ]; $instance [ 'youtube' ] = $new_instance [ 'youtube' ]; |
add
1 | $instance [ 'picasa' ] = $new_instance [ 'picasa' ]; |
1 2 3 4 5 6 7 | $instance [ 'twitter_label' ] = $new_instance [ 'twitter_label' ]; $instance [ 'facebook_label' ] = $new_instance [ 'facebook_label' ]; $instance [ 'flickr_label' ] = $new_instance [ 'flickr_label' ]; $instance [ 'feed_label' ] = $new_instance [ 'feed_label' ]; $instance [ 'linkedin_label' ] = $new_instance [ 'linkedin_label' ]; $instance [ 'delicious_label' ] = $new_instance [ 'delicious_label' ]; $instance [ 'youtube_label' ] = $new_instance [ 'youtube_label' ]; |
add
1 | $instance [ 'picasa_label' ] = $new_instance [ 'picasa_label' ]; |
1 | $defaults = array ( 'title' => '' , 'twitter' => '' , 'twitter_label' => '' , 'facebook' => '' , 'facebook_label' => '' , 'flickr' => '' , 'flickr_label' => '' , 'feed' => '' , 'feed_label' => '' , 'linkedin' => '' , 'linkedin_label' => '' , 'delicious' => '' , 'delicious_label' => '' , 'youtube' => '' , 'youtube_label' => '' , 'display' => 'icons' , 'text' => '' ); |
to
1 | $defaults = array ( 'title' => '' , 'twitter' => '' , 'twitter_label' => '' , 'facebook' => '' , 'facebook_label' => '' , 'flickr' => '' , 'flickr_label' => '' , 'feed' => '' , 'feed_label' => '' , 'linkedin' => '' , 'linkedin_label' => '' , 'delicious' => '' , 'delicious_label' => '' , 'youtube' => '' , 'youtube_label' => '' , 'picasa' => '' , 'picasa_label' => '' , 'display' => 'icons' , 'text' => '' ); |
1 2 3 4 5 6 7 | $twitter = $instance [ 'twitter' ]; $facebook = $instance [ 'facebook' ]; $flickr = $instance [ 'flickr' ]; $feed = $instance [ 'feed' ]; $linkedin = $instance [ 'linkedin' ]; $delicious = $instance [ 'delicious' ]; $youtube = $instance [ 'youtube' ]; |
add
1 | $picasa = $instance [ 'picasa' ]; |
1 2 3 4 5 6 7 | $twitter_label = $instance [ 'twitter_label' ]; $facebook_label = $instance [ 'facebook_label' ]; $flickr_label = $instance [ 'flickr_label' ]; $feed_label = $instance [ 'feed_label' ]; $linkedin_label = $instance [ 'linkedin_label' ]; $delicious_label = $instance [ 'delicious_label' ]; $youtube_label = $instance [ 'youtube_label' ]; |
add
1 | $picasa_label = $instance [ 'picasa_label' ]; |
1 2 3 4 5 6 7 | <fieldset style= "border:1px solid #dfdfdf; padding:10px 10px 0; margin-bottom:1em;" ><br> <legend style= "padding:0 5px;" ><?php _e( 'Youtube' , CURRENT_THEME); ?>:</legend><br> <label for = "<?php echo $this->get_field_id('youtube'); ?>" ><?php _e( 'Youtube URL:' , CURRENT_THEME); ?></label><br> <input class = "widefat" id= "<?php echo $this->get_field_id('youtube'); ?>" name= "<?php echo $this->get_field_name('youtube'); ?>" type= "text" value= "<?php echo esc_attr($youtube); ?>" /><br> <label for = "<?php echo $this->get_field_id('youtube_label'); ?>" ><?php _e( 'Youtube label:' , CURRENT_THEME); ?></label><br> <input class = "widefat" id= "<?php echo $this->get_field_id('youtube_label'); ?>" name= "<?php echo $this->get_field_name('youtube_label'); ?>" type= "text" value= "<?php echo esc_attr($youtube_label); ?>" /><br> </fieldset> |
Add
1 2 3 4 5 6 7 | <fieldset style= "border:1px solid #dfdfdf; padding:10px 10px 0; margin-bottom:1em;" ><br> <legend style= "padding:0 5px;" ><?php _e( 'Picasa' , CURRENT_THEME); ?>:</legend><br> <label for = "<?php echo $this->get_field_id('picasa'); ?>" ><?php _e( 'Picasa URL:' , CURRENT_THEME); ?></label><br> <input class = "widefat" id= "<?php echo $this->get_field_id('picasa'); ?>" name= "<?php echo $this->get_field_name('picasa'); ?>" type= "text" value= "<?php echo esc_attr($picasa); ?>" /><br> <label for = "<?php echo $this->get_field_id('picasa_label'); ?>" ><?php _e( 'Picasa label:' , CURRENT_THEME); ?></label><br> <input class = "widefat" id= "<?php echo $this->get_field_id('picasa_label'); ?>" name= "<?php echo $this->get_field_name('picasa_label'); ?>" type= "text" value= "<?php echo esc_attr($picasa_label); ?>" /><br> </fieldset> |
In order to change the tooltips, for example of facebook to myfacebook
1 | $networks [ 'Facebook' ][ 'link' ] = $instance [ 'facebook' ]; |
to
1 | $networks [ 'Myfacebook' ][ 'link' ] = $instance [ 'facebook' ]; |
And the name in line 48 to
1 | <?php foreach ( array ( "Myfacebook" , "Twitter" , "Flickr" , "Feed" , "Linkedin" , "Delicious" , "Youtube) as $network ) : ?> |
Magento 2 is a expansive, flexible, and modifiable e-commerce system. It offer an myriad of…
WHAT IS A 301 REDIRECT? A 301 redirect is a way of allow search engines…
The Easiest Way to Create a CSS Rule for Image Rollover When wanting to be…