Below, you’ll find a detailed guide on how to add the Ultimate Social Media Icons Shortcode to your WordPress website, including its parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Ultimate Social Media Icons Plugin shortcode not to show or not to work correctly.
Before starting, here is an overview of the Ultimate Social Media Icons Plugin and the shortcodes it provides:
"Social Media Share Buttons & Social Sharing Icons is a WordPress plugin that helps you to seamlessly integrate share buttons for your social media networks. With this plugin, promoting your content becomes a breeze."
- [DISPLAY_ULTIMATE_SOCIAL_ICONS]
[DISPLAY_ULTIMATE_SOCIAL_ICONS] Shortcode
The Ultimate Social Media Icons shortcode is a powerful tool for displaying social media icons on your website. It allows you to customize the display, including the title and widget settings. This shortcode generates a div container with class “sfsi_widget sfsi_shortcode_container”, where social media icons are displayed. The visibility of these icons is determined by the ‘sfsi_check_visiblity’ function. The shortcode also handles widget title and widget visibility.
Shortcode: [DISPLAY_ULTIMATE_SOCIAL_ICONS]
Examples and Usage
Basic example – Displaying the ultimate social icons without any specific title.
[DISPLAY_ULTIMATE_SOCIAL_ICONS]
PHP Function Code
In case you have difficulties debugging what causing issues with [DISPLAY_ULTIMATE_SOCIAL_ICONS]
shortcode, check below the related PHP functions code.
Shortcode line:
add_shortcode("DISPLAY_ULTIMATE_SOCIAL_ICONS", "DISPLAY_ULTIMATE_SOCIAL_ICONS");
Shortcode PHP function:
function DISPLAY_ULTIMATE_SOCIAL_ICONS($args = null, $content = null) {
$instance = array("showf" => 1, "title" => '');
$return = '';
if (!isset($before_widget)) : $before_widget = '';
endif;
if (!isset($after_widget)) : $after_widget = '';
endif;
/*Our variables from the widget settings. */
$title = apply_filters('widget_title', $instance['title']);
$show_info = isset($instance['show_info']) ? $instance['show_info'] : false;
global $is_floter;
$return .= $before_widget;
/* Display the widget title */
if ($title) $return .= $before_title . $title . $after_title;
$return .= '<div class="sfsi_widget sfsi_shortcode_container">';
/* Comment for shuffle issue */
//$return .= '<div id="sfsi_wDiv"></div>';
/* Link the main icons function */
$return .= sfsi_check_visiblity(0, 'shortcode');
$return .= '<div style="clear: both;"></div>';
$return .= '</div>';
$return .= $after_widget;
return $return;
}
Code file location:
ultimate-social-media-icons/ultimate-social-media-icons/ultimate_social_media_icons.php
Conclusion
Now that you’ve learned how to embed the Ultimate Social Media Icons Plugin shortcode, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.
Leave a Reply