You can use this plugin to get the number of shares for a given post by ID.
How to use
To count for example how many times the post or page has been shared on Facebook use the function echo pssc_facebook() in the loop or echo pssc_facebook( $post_id ) anywhere. This function will return the count integer for example 5 or 0.
Or you can use the shortcode [pssc_facebook] in the post you want to count shares for or [pssc_facebook post_id=””] for a specific post by ID.
Note that PHP functions needs to be echoed.
- Version 1.4.1: Removed Twitter functions due Twitter’s disabling their count API.
- Version 1.4.0: Fixed some bugs and added Posts Social Shares Count to edit posts/pages/custom post types list view in admin (edit.php).
- Version 1.3.1: Fixed a bug with caching.
- Version 1.3: Added caching ’support and Added total shares count to post edit page.
- Version 1.2: Fixed a bug with functions without post ID usage.
- Version 1.1: Fixed a bug with pssc_all shortcode
- Go to your admin area and select Plugins -> Add new from the menu.
- Search for \”Posts Social Shares Count\”.
- Click install.
- Click activate.
Contributors & Developers
“Posts Social Shares Count” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- Bug fixes
- Disabled Twitter functions because Twitter has disabled their count API. See this blog post
- Added Posts Social Shares Count to edit posts/pages/custom post types list view in admin (edit.php).
- Fixed PHP notices that displayed randomly.
- Fixed Is’sue for users with PHP safe_mode or open_basedir set on.
- Fixed Is’sue with Pinterest count to always 0.
- Fixed a bug with caching
- Added Caching ’support
- Improved performance
- Added total shares count to post edit page
- Fixed a bug with functions without post ID usage.
- Fixed a bug with [pssc_all] shortcode
- Initial Plugin Release