3 Easy Ways to Setup Your Social Popularity Widget

Social Popularity Widget is an extension of Social Metrics Pro plugin. You can use it to show popular social media posts from your blog. The widget picks up and displays the posts with highest social signals based on the desired selection criteria. There are 3 ways to display Social Popularity widget on your site:

  1. Using WordPress Widgets in your sidebars and other widget-ready areas
  2. Using Shortcodes in your posts
  3. Using PHP functions in your theme templates

1. Using WordPress Widgets

This is the easiest way to display Social Popularity widget on your sidebar and other widget ready areas. Follow these steps to create one for your blog. From your WordPress Dashboard go to Appearance -> Widgets.

WordPress Widgets

Find the Social Popularity widget in the Available Widgets section. Now drag and drop the widget at the desired place in your theme’s Widget ready areas displayed on the right. Give your widget a title and choose a widget to be displayed from the dropdown. Dropdown will lists the widgets pre-created for you as well as those you have created using the Social Popularity Widget Editor tool.

Social Popularity Widget

Save the widget and you are all set. The widget will start displaying your popular social signals on your blog.

Social Signals

2. Using Shortcodes in Your Posts

You can also use a special shortcode to insert the Social Popularity widget anywhere in your posts or pages. Simply insert the shortcode as shown below anywhere in your posts or pages and you are all set:
[socialpop id=YOUR_WIDGET_ID]
Replace YOUR_WIDGET_ID with appropriate ID of the widget you wish to display.

3. Using PHP Function in Your Theme Templates

You can make use of following code snippet to display the Social Popularity widget in your WordPress theme templates.
<?php
if ( function_exists( 'socialpopularity_display_widget' ) ){
$wid = YOUR_WIDGET_ID;
socialpopularity_display_widget( $wid );
// To capture the output in a variable instead, use
// socialpopularity_display_widget( $wid, false );
}
?>

Replace YOUR_WIDGET_ID with appropriate ID of the widget you wish to display.

About Riyaz

Riyaz Sayyad is founder of Social Metrics Pro and editor of riyaz.net. Connect with him on Facebook, Twitter and Google+.

Loading Facebook Comments ...