Skip to content

Adds the # of times a post has been shared on major social networks as post meta.

Notifications You must be signed in to change notification settings

humanmade/Social-Counts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HM Social Counts

Adds the # of times a post has been shared on major social networks as post meta. It uses http://sharedcount.com/ and it's API.

Please Note: This plugin requires an account / API from http://sharedcount.com/ in order to work.

#Pull Requests Welcome Let's make it a kick-ass plugin we can share with the worlds.

Installation

  • Upload this directory to your '/wp-content/plugins/' directory, using your prefered method (ftp, sftp, etc.)
  • Activate Social Counts from your plugins page in your WordPress Dashboard area.

Usage

Place the following code in your WordPress loop(s) to display the total number of shares:

<?php

if ( class_exists( 'HM_Social_Counts' ) ) {
	echo HM_Social_Counts()->get_total_shares();
}

###Here's a list of networks currently supported from the SharedCount API:

  • StumbleUpon
  • Reddit
  • Facebook
  • Delicious
  • Google+
  • Buzz
  • Twitter
  • Digg
  • Pinterest
  • LinkedIn

If you'd like to display the total count from a specific network you could add a network paramter to your template tag.

For example:

<?php

if ( class_exists( 'HM_Social_Counts' ) ) {
	echo HM_Social_Counts()->get_total_shares( 'facebook' );
}

About

Adds the # of times a post has been shared on major social networks as post meta.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages