-
-
Hi, how do i add Instagram to the list of social media in the social widget at the top header?
I’ll appreciate your response.
Thanx
- This topic was modified 9 years, 10 months ago by designocart.
-
Hello,
It can be achieved with some customization.
Edit the file \specular\includes\widgets\codeless_socialwidget.php
Find this code:echo '<ul class="footer_social_icons '.esc_attr($style).'">'; if( !empty($cl_redata['facebook']) ) echo '<li class="facebook"><a href="'.esc_url($cl_redata['facebook']).'"><i class="icon-facebook"></i></a></li>'; if( !empty($cl_redata['twitter']) ) echo '<li class="twitter"><a href="'.esc_url($cl_redata['twitter']).'"><i class="icon-twitter"></i></a></li>'; if( !empty($cl_redata['flickr']) ) echo '<li class="flickr"><a href="'.esc_url($cl_redata['flickr']).'"><i class="icon-flickr"></i></a></li>'; if( !empty($cl_redata['google']) ) echo '<li class="google"><a href="'.esc_url($cl_redata['google']).'"><i class="icon-google"></i></a></li>'; if( !empty($cl_redata['dribbble']) ) echo '<li class="dribbble"><a href="'.esc_url($cl_redata['dribbble']).'"><i class="icon-dribbble"></i></a></li>'; if( !empty($cl_redata['foursquare']) ) echo '<li class="foursquare"><a href="'.esc_url($cl_redata['foursquare']).'"><i class="icon-foursquare"></i></a></li>'; if( !empty($cl_redata['linkedin']) ) echo '<li class="foursquare"><a href="'.esc_url($cl_redata['linkedin']).'"><i class="icon-linkedin"></i></a></li>'; if( !empty($cl_redata['youtube']) ) echo '<li class="youtube"><a href="'.esc_url($cl_redata['youtube']).'"><i class="icon-youtube"></i></a></li>'; if( !empty($cl_redata['email']) ) echo '<li class="email"><a href="'.esc_url($cl_redata['vk']).'"><i class="icon-envelope"></i></a></li>';
and add this one below the above code:
if( !empty($cl_redata['instagram']) ) echo '<li class="instagram"><a href="'.esc_url($cl_redata['instagram']).'"><i class="icon-instagram"></i></a></li>';
Then edit the file specular\includes\core\codeles_options.php, find the lines:
$this->sections[] = array( 'icon' => 'el-icon-twitter', 'title' => __('Social Media', 'codeless-admin'), 'fields' => array( array( 'id' => 'facebook', 'type' => 'text', 'title' => __('Facebook Link', 'codeless-admin') ), array( 'id' => 'twitter', 'type' => 'text', 'title' => __('Twitter Link', 'codeless-admin') ), array( 'id' => 'flickr', 'type' => 'text', 'title' => __('Flickr Link', 'codeless-admin') ), array( 'id' => 'foursquare', 'type' => 'text', 'title' => __('Foursquare Link', 'codeless-admin') ), array( 'id' => 'google', 'type' => 'text', 'title' => __('Google Plus Link', 'codeless-admin') ), array( 'id' => 'dribbble', 'type' => 'text', 'title' => __('Dribbble Link', 'codeless-admin') ), array( 'id' => 'linkedin', 'type' => 'text', 'title' => __('Linkedin Link', 'codeless-admin') ), array( 'id' => 'youtube', 'type' => 'text', 'title' => __('Youtube Link', 'codeless-admin') ), array( 'id' => 'email', 'type' => 'text', 'title' => __('Email Link', 'codeless-admin') ),
and add this one below it:
array( 'id' => 'instagram', 'type' => 'text', 'title' => __('Instagram Link', 'codeless-admin') )
Now you can refresh the general options and you can see there at Social Media section a new field for the Instagram link.
Let us know if you need further help.
Best regards!
-
Thank you so much. that fixed it. I was even able to make each link open in a new tab/window by adding target=”_blank”.
I appreciate!
- This reply was modified 9 years, 10 months ago by designocart.
-
-
Hi there, I have an updated version of Specular that has the instagram slot in the theme options. However, the instagram slot links with a “mailto:” tag and the email link doesn’t. Can this be updated or how can I modify the version on my end? Thank you.
-
Hello,
You are right and Thank you for noticing this. Please go to file specular\includes\widgets\codeless_socialwidget.php and find this line:
echo '<li class="email"><a href="mailto:'.esc_url($cl_redata['instagram']).'"><i class="icon-instagram"></i></a></li>';
Replace it with this:
echo '<li class="email"><a href="'.esc_url($cl_redata['instagram']).'"><i class="icon-instagram"></i></a></li>';
We will change this in the next update.Best regards!
-
Can adding Pinterest as an option be included in the next update? It seems like a common social platform to have included.
-
Hello,
I will add it to the to-do list. We will include it for sure.
Best regards!
-
You must be logged in to reply to this topic.