- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
CherryFramework 3. How to make social links open in a new window (based on shortcode)
February 1, 2016
This tutorial will show you how to make social links open in a new tab in CherryFramework 3 templates (based on shortcode).
CherryFramework 3. How to make social links open in a new window (based on shortcode)
-
Log into your WordPress dashboard.
-
Navigate to Appearance > Editor:
-
Find custom-function.php file in the list to edit it:
-
Scroll down to find lines with code for social links:
$output = '<div class="social-wrapper '.$custom_class.'">'; $output .= '<a href="'.$facebook_url.'"><i class="icon-facebook"></i></a>'; $output .= '<a href="'.$twitter_url.'"><i class="icon-twitter"></i></a>'; $output .= '<a href="'.$google_plus_url.'"><i class="icon-google-plus"></i></a>'; $output .= '</div>';
-
You should edit each line for social links, so it should look like in this example:
$output = '<div class="social-wrapper '.$custom_class.'">'; $output .= '<a href="'.$facebook_url.'" target="blank"><i class="icon-facebook"></i></a>'; $output .= '<a href="'.$twitter_url.'" target="blank"><i class="icon-twitter"></i></a>'; $output .= '<a href="'.$google_plus_url.'" target="blank"><i class="icon-google-plus"></i></a>'; $output .= '</div>';
-
Click Update file button to save changes:
-
Refresh your page, the links will open in a new tab.
Feel free to check the detailed video tutorial below:
CherryFramework 3. How to make social links open in a new window (based on shortcode)