How to Get Social Share Counts in WordPress

• 18 minutes READ

Do you know that there is a simple way to maximize your social media exposure on your WordPress website? Whether it is a blog or digital store, this approach will increase traffic, boost user’s engagement and improve overall brand image. And it is not some kind of a secret instrument that only professional marketers know or a service that will cost you a fortune. This simple add-on to the website often stays overlooked; however, it makes the difference, as practice shows. This underrated add-on is social share counts.

Social share counts offer a simple way to boost your social media marketing strategy and increase the virality of campaigns run on the WordPress website. As metrics well served, they play some finessed psychological tricks on your customers that help capitalize on social media impact and bring benefits in the long term.

Follow our guide where we dive into social share counts to find out why they are important for your business to thrive and how to add them quickly to your WordPress website. But first, let’s clear up the impact of social media on business in 2021.

The Impact of Social Media on Business

Social media is here, there, and pretty much everywhere. It is inescapable. Slowly but surely, we are all becoming social media addicts. Facebook, Instagram, Twitter, and other platforms have completely integrated into our daily lives. The latest statistics show that,

  • Almost half of the entire World’s population is involved in social media one way or another. It is a staggering 3.78 billion people. This number is in no case going to stop: it will just grow and exceed all limitations over the next few years.
  • Roughly 80 percent of US adults aged from 18 to 49 are active social media users. This number falls a bit to 73 percent for the 50- to 64-year-old age group, though it is still a big market to cover.
  • Almost two and a half hours are spent per day per person on social media. Over the third of these active people check social media five times a day.
  • More than 70 percent of consumers are likely to recommend the brand that offers a positive experience on social media.
  • More than 50% of prospects use social media platforms to get recommendations about the product to make a final decision.
How to Get Social Share Counts in WordPress


What do these stats mean for your business or a blog? It means a lot. For instance,

No-Code Email Template Builder

With Postcards Email Builder you can create and edit email templates online without any coding skills! Includes more than 100 components to help you create custom emails templates faster than ever before.

Free Email BuilderFree Email Templates
  • More buyers are joining social media networks – it means your potential market is expanding exponentially.
  • More buyers are looking for recommendations and reviews on social media – it means you have a golden opportunity to satisfy their needs and unobtrusively point them in the desired direction through actively responding to comments, honoring mentions, and writing messages.
  • More buyers are visiting social media platforms each day – it means that you can easily reach your target market every single day, keep in touch with your audience and maintain the proper level of engagement with your brand.
  • More buyers are becoming familiar with social media platforms – it means you can eventually fill the gaps in your target market and reach specific audiences.
  • Almost all age groups, except for kids and the older people who are 65 years old and above, use social media daily– it means that the most active buyers who generate the biggest profit per customer are in the game.

Clearly, not only are social media platforms a place where you can communicate with others, share your thoughts or post hilarious images of cats, but they are also a perfect place to get your business up and running. They open up countless opportunities for companies, especially those looking to reach out to their audience through all possible channels. Let us consider how social media impact your business.

Top 5 Ways How Social Media Impact Your Business

First and foremost, social media is a valid alternative to the traditional channel of getting traffic from search engines. It concerns both paid and organic reach. Even if something goes wrong with your rank and position in Google, you will still have social media to stay afloat.

Second, social media saves your money because it is cost-effective marketing. According to stats, advertising through social platforms is 3 times less expensive than advertising through traditional media. What’s more, it can even cost you nothing because a person who shares a message could possibly reach hundreds or even thousands of people.

Third, social media is a powerful channel to engage customers. Believe it or not, almost 40% of consumers expect a response from a company on social media within one hour. The more active you are in social media, the more prospects will be engaged with your brand. It may help to generate quality leads that result in real profit.

Fourth, social media helps to deliver a better omnichannel messaging experience during the customer lifecycle. This helps to raise the level of customer satisfaction. As we all know, the more users are satisfied with your brand, the more likely they will make another purchase, recommend your products to others and just stay your loyal fans for much longer.

Finally, social media boosts your brand identity and builds loyalty. Trust is everything when it comes to promoting and selling your goods online. An active social media account is what you need to build relationships with your customers, turn visitors into the company’s evangelists, and establish yourself as a trustworthy partner ready to honor all customer’s quotes.

To sum up, if you want to skyrocket your business in the digital expanses, then it is about time to get on the wave of social media marketing.

A snippet from the infographic "Incredible Ways Social Media Impacts Your Business In 2021" by Top Growth Marketing

Top Growth Marketing

Low-Code Website Builders

With Startup App and Slides App you can build unlimited websites using the online website editor which includes ready-made designed and coded elements, templates and themes.

Try Startup App Try Slides AppOther Products

Social Share Counts: Why Do You Need Them?

So, how to involve social media marketing in your website?

The first thing that springs to mind is, of course, to add tools that let digital audiences share text snippets through their accounts on the platforms. However, it is not the only instrument in your fight for the growth and success of your company. There is another social media-related instrument that helps to win this battle: it is social share counts.

Social share counts always stay overlooked by digital entrepreneurs. However, social media marketers are perfectly aware that they bear a big potential that, in the right hands, can quickly get your business to the path of success.

Let’s find out what are social share counts and why they are essential for your business to stay in the game.

What Are Social Share Counts?

Simply put, social share counts are counters that show how many times a URL has been shared on every social networking service. It starts with zero and increases by one every time a person shares a source with friends through the account in the platform. The majority of social media platforms support being able to query and display share counts through their API so that you can get this information in real-time and provide visitors with up-to-date data.

There are two types of social share counts. The first one features individual network share counts. The second one features the number of all your share counts combined.

Social share counts are displayed as social media icons or buttons with logotypes of corresponding platforms. They can have a round shape, square shape, triangle shape, and even star shape. As a rule, they are just indicators; however, some have a social sharing mechanism playing a role of a traditional social share plugin.

What Are Social Share Counts?

A Range of Social Share Counts

Why Are Social Share Counts Important for Your Website and Business?

As we have already pointed out, social media plays a crucial role in business success these days. Therefore, it is increasingly important to create a rich and seamless social media experience for your prospects across all channels, including a website. One way to do this is to add social share counts. Although they have nothing to do with running advertisements on social media platforms, they still play a crucial role in the overall strategy. Let’s consider several good reasons why social share counts are important for your website and business.

  1. Social share counts are metrics that show you, an owner of the company, the effectiveness of your content strategy, and the popularity of the source. You can immediately assess the success of a story that has been published or a product that is sold in your store without visiting other specific services.
  2. Acting as a rating system that indicates the source’s popularity, social share counts are social proof that may compel users to buy a product or share the article with others. As we all know, people are more likely to fall for the source or product if other people like it. It is in our nature. Even though at the very beginning, when the numbers are extremely low, they have a minimal effect; however, as time passes by and numbers are getting bigger, the effect becomes more tangible, playing a vast persuasive role in the decision-making process.
  3. Social share counts unobtrusively compel visitors to share the URL with others through their beloved social media channels. Consider this; if your article brings value to the readers, they will want to give something back: it is a law of reciprocity. In this particular case, social share counts placed right next to the block with the article will tell your users that they can express their appreciation by starting word of mouth, thereby pushing them to share the source with others.
  4. Social share counts raise the profile of your brand in the digital expanses. Companies that interact with customers through social media platforms show users that they care. Moreover, recent studies demonstrate that people expect your company to be on social media platforms. Therefore, a set of social share counts right on top of the page indicates that the company is incredibly into social media.
  5. Social share counts increase the company’s credibility because they show that the brand actively communicates with the users on social media platforms. The studies show that people feel much better about brands, which actively respond to the comments and lead conversations with clients; these respondents agree that they are more likely to do business with such companies.
  6. Social share counts build up trust since they show that the owner does not hide anything. With numbers exposed to the crowd, everything is fair and square. On the web, where there is no traditional warm personal contact, this transparency in relationships can easily cultivate customers’ faith in the brand.
  7. Social media counts inspire loyalty because they are indicators of a seamless omnichannel customer experience.
  8. Last but not least, social share counts make your brand look up-to-date, meeting the expectations of your target market. Remember, packaging sells. Therefore, looking good on the Internet is crucial. No one likes old website designs, especially generation X, which are up to everything zingy. Well-crafted social share counts will not only make the website look stylish, but they will also indicate that the brand follows the mainstream and speaks the crowd’s language.
Why Are Social Share Counts Important for Your Website and Business?

MDG Advertising

What Social Share Counts Do You Need?

According to a list of social networking services published in Wikipedia, more than 250 platforms let users build social relationships on the web. Do you need all of them on your website? No. There are two reasons for that.

First, your prospects may be members of numerous social media platforms; however, they do not have time to visit all of them. They have several favorites that they check up on every single day.

Second, the more social share counts you add, the more confusing the user experience will be because the information will be challenging to process. The golden rule dictates, seven elements in the row are the maximum you can use without upsetting the reading experience and perception of the information.

Therefore, you need to choose only 5-7 social share counts among such a wide variety.

So, what to choose? How to define what social share counts you need for your website and business?

Recent studies show that Facebook is currently holding the position of the biggest social networking service in the World. It boasts 2.32 billion active monthly users. So obviously, it should be your first choice for social share counts. However, if your target market is from China, then your first option should be WeChat because, according to Statista, it is the biggest and the most popular messaging app there.

The takeaway is that first, analyze the location of your target market. It will give you hints on what social media platforms are popular among the customers.

Second, analyze the age group. According to studies, Facebook and YouTube remain some of the most popular and widely used platforms among users; even the adults above the age of 65 visits these websites. However, if you need to reach adults under 30, then you need to focus on Instagram and Snapchat, thereby prioritizing social share counts for these services first.

Third, take into account gender. Believe it or not, some social media platforms are more prevalent among women than men and vice versa. For example, recent studies show that almost 50% of female respondents say they use Pinterest, whereas only 16% of male respondents can say the same. Therefore, if you sell men stuff, there is no point in adding Pinterest as a social share count.

Finally, it is vital to analyze your social media statistics to choose your website and business’s best social share counts. For example, what social media platform your target market is using most often? Answering this question will help you determine which platform could be of most use and what social share counts will make the more significant impact.

What Social Share Counts Do You Need?


How to Use Social Share Counts in WordPress to Get Maximum Exposure?

So, after deciding on your top 7 social share counts for your websites, it is time to determine how to use them in the website to maximize their potential. Let’s consider some good tips.


Location, location, location. Much like in real estate, the position of social share counts is of great importance. Two sweet spots generate the most exposure.

The first one is on the top of the post or page. Acting as social proof (especially when the numbers are high), they reinforce the user’s belief that this article or service is worthwhile. This may compel visitors to keep going with your website and take their precious time to read the article or description of the service, even though they might not be interested in it in the first instance.

The second one is at the bottom of the page. This position is strategically correct. As users finish reading the article, social share counts might come in handy because they nudge to appreciate the author as other readers did and hint on how to do it the right way (aka using a social sharing mechanism).

In addition, when choosing the position that works the best for you, remember these tips:

  • Do not make social share counts to compete with many other elements in the user interface,
  • Avoid too close proximity to navigation, buttons, and icons.
  • Do not repeat yourself. Sometimes one widget with social share counts is all you need to persuade users to stay on your website for a bit longer.
  • Place them close to the content.
How to Use Social Share Counts in WordPress to Get Maximum Exposure?

Left-hand position of social share counts on ShareThis


The more prominent social share counts are, the more likely users notice them. The easiest way to make them attention-grabbing is to make them big. However, how big is big?

The thing to remember about social share counts, they are not social share buttons. They should not scream out at the audience, but they should not keep a low profile as well. Therefore, you do not have to make them extremely large. The medium size will be enough to catch the eye of the user and deliver the message.

SVG Social Media Icons by Ruandré Janse van Rensburg

SVG Social Media Icons by Ruandré Janse van Rensburg


You can go for a traditional approach or a custom one. Your decision should depend on such factors as

  • brand identity;
  • company’s overall image on the web;
  • marketing strategy;
  • target audience;
  • results of A/B tests.

If you want to play safe, then a neutral solution is a way to go. However, suppose you want to meet your audience’s preferences and expectations. In that case, you need to align your graphics with your brand to maintain consistency and harmony and do A/B tests to figure out what option resonates the best with the audience.

The minimal style for social share counts in MDBootstrap

The minimal style for social share counts in MDBootstrap

Should You Use Social Share Counts or Not?

Social share counts offer numerous benefits for the business owner; however, they still have some shortcomings. One of the main flaws is that low share counts may dissuade a user and hurt conversion rates. This raises the question of whether to use them on your website or not. To answer it, you need to analyze the target market and your online presence.

For example, if you are a well-established company with a 10-year blog, you should not worry about the low numbers in social share counts since you have a solid, active audience that likes to share your stuff. However, if you just start your journey, it can be a potential issue since even though social share counts may help build up trust, they still will not work as social proof.

The good thing is, people are getting accustomed to low share counts. There is nothing extraordinary about them being small. Therefore, do a series of A/B tests to see whether your audience is okay with low numbers or not to decide on the fate of social share counts in your project.

Last but not least. There is an alternative solution for those who do not want to conduct tests. Use plugins that let you set the minimum displayed number of shares. For example, once you hit 100 shares, you can activate social share counts.

And on that note, let’s find out how to get social share counts for your WordPress website.

How to Get Social Share Counts in WordPress?

Although social share counts are in some way analytical tools that show metrics, it does not mean they are difficult to add to your WordPress website. On the contrary, they are straightforward to work with because everything boils down to finding the best plugin for a WordPress website. Let’s consider several outstanding WordPress plugins that provide you with a set of fully customized and easily operated social share counts.

How to Get Social Share Counts in WordPress?

Social Media Share Buttons Popup

With staggering 200,000 active installations, this social media WordPress plugin is one of the most popular and reliable options in this category. It works with more than 200 social networks, including the favorite options like Facebook, Twitter, or Pinterest and some rare ones like WeChat. The great thing is, it comes with numerous features, such as:

  • It is straightforward to work with, thanks to a handy settings page.
  • It has 16 predefined styles, yet with all that, it allows you to upload custom share icons of your choice.
  • It lets you assign several actions or animations to the buttons.
  • It can be “sticky,” float, and even displayed in the pop-up message.

That is not all; if you need extra functionality, you can always check out its premium version.

Sassy Social Share

Sassy Social Share

Sassy social share also boasted a remarkable number of active installations. It has helped more than 100,000 website owners out there. As befits such trustworthy WordPress plugins, it has much to offer. For instance,

  • It works with 100 popular bookmarking services. Facebook, Twitter, Reddit, Pinterest, Fintel, and Vkontakte are among them.
  • It has handy customization options to specify the shape, size, color, and other parameters of the component.
  • It is responsive and mobile-friendly.
  • It is fully compatible with AMP, Woocommerce, and BuddyPress.
Grow Social

Grow Social

Grow Social is another fantastic free social share WordPress plugin on our list that you should check out if you want to add social share counts and enjoy their benefits. It is simple, lightweight, and handy. Among its main features are:

  • It offers four different locations to add social share counts.
  • It can show social share counts for each platform individually and the total amount, which is a safe option for new articles and products that cannot yet boast huge numbers.
  • It has retina-ready graphics.
  • It offers basic customization options.
  • It comes with three predefined styles perfect for the majority of websites out there.

Much like the plugin by UltimatelySocial, this one also comes with a premium version for those who need to take their social media marketing to the next level.

Social Media Share Buttons

Social Media Share Buttons

MashShare (a short name for this social media WordPress plugin) is not a feature-rich component; nevertheless, it has all the essential functions you may need to show social share counts. For instance,

  • It has an async share count aggregation.
  • It offers a dashboard to work with the total share count of each individual post.
  • It offers beautiful, stylish, fully responsive vector graphics.
  • It can be extended through extra add-ons that are available free of charge. Potentially, you can collaborate with Google Analytics, YouTube Video Share, and much more.
  • It is DSGVO compliant that is incredibly important for those who target audiences inside the EU.
  • Finally, it does not use external files and operates with the object and transient caches, making it fast and efficient.
Shared Counts by Bill Erickson and Jared Atchison

Shared Counts by Bill Erickson and Jared Atchison

Last but not least. Unlike all other WordPress plugins, this one will strike you with its primitiveness and simplicity; however, it does not mean it will not do its job perfectly. If you do not mind spending some time on CSS files to give the design a unique flavor, it can become a perfect partner in crime for your website.

The main advantage of this solution is that it is increasingly light because it uses a unique cache method that has a minimal effect on site overhead. On top of that, it has a clean code with a neat structure, making it a great foundation to build on. Many developers use it as a base to introduce specific features. However, if you are up to a quick solution, then it has something to offer as well. For instance,

  • It ships with several basic yet hand-crafted styles for share counts.
  • It has two add-ons to customize social share counts.
  • It does not use cookies or tracking scripts meeting GDPR law and safely working in every country.

Work with API (Do Everything from Scratch)

The main shortcoming of the WordPress plugins featured above is that, first and foremost, they were created to add social media share buttons with an extra option to show metrics. If you need pure social share counts without additional functionality, you need to do everything from scratch by working with the social medium platforms’ APIs.

Although “working with API” may send a chill down the spine, especially for novice developers, however, it is the only way out that, for the record, will make the component work more efficient and the page load faster.

More so, not everything is that scary. The routine of adding social share counts for popular platforms like Facebook and Twitter is straightforward. Follow our guide to see it for yourself.

Note, this routine is almost the same for other social media platforms. Therefore, you can easily use it to add as many counters as you need.

You will be hard-pressed to find someone that doesn’t belong to a social media network these days.

Virtually all social networks provide buttons that simplify the process of sharing website content to their platforms.

To take advantage of the large user base and high engagement of social networks and bookmarking sites (such as Facebook, Twitter, Google+ and StumbleUpon), webmasters and site administration often add social buttons to their sites.

In this article, we are not going to build another social sharing plugin; rather we will learn how to programmatically get the number of social counts from Facebook, Twitter, Google Plus, Pinterest etc. onto your site.

Armed with this knowledge; in the second part of this series, we will build a WordPress plugin that displays share, likes and tweet count as text in WordPress in the second part of this article.

Note: There are a lot of social network and bookmarking websites. For the sake of brevity (and impact on the most users), we will focus on the following: Facebook, Twitter, Google+, LinkedIn, StumbleUpon and Pinterest.

Why Bother With Social Count?

I’m certain this is a question in someone’s mind right now. With a social count, you can make your site look cool when you add a social profile and share buttons with real-time count of social engagement of a content or blog post.

Below is a screenshot of sharing buttons along with the total share count.

Mashable share buttons with total share count

Another example is The Next Web similar to Mashable in that it also display the total share count.

The Next Web Social Buttons

Getting Social Network Share Count

In no particular order, let’s see how we can programmatically get the social share count of a webpage.

Facebook Likes and Shares

To get the number of times a webpage has been liked and shared on Facebook, pass the page URL to Facebook Graph API .

Say we want to get the number of Likes and Shares this URL, passing the URL to the Graph API as follows will output the following JSON information with the count at property shares.

   "id": "",
   "shares": 140

To get the Facebook likes and shares count of any web page in PHP, pass the URL to the PHP function below:

$facebook_like_share_count = function ( $url ) {

	$api = file_get_contents( '' . $url );

	$count = json_decode( $api );

	return $count->shares;

The code below uses the function $facebook_like_share_count to output the likes and share count of

echo $facebook_like_share_count( '' );

Bonus: Getting the like count of a Facebook page is quite similar to that of a webpage. The difference is while the former is in property likes, the latter is in shares.

The code below will output the number likes the official Designmodo Facebook Page has gotten.

$facebook_page_like_count = function ( $url ) {

	$api = file_get_contents( '' . $url );

	$count = json_decode( $api );

	return $count->likes;

echo $facebook_page_like_count( '' );

Twitter Posts

To get the number of times a post, content or web page got tweeted, make an API call to Twitter as follows: where denote the page URL.


Similar to the function code for Facebook likes and share count, the code below output the tweets count of the page.

$twitter_tweet_count = function ( $url ) {

	$api = file_get_contents( '' . $url );

	$count = json_decode( $api );

	return $count->count;

echo $twitter_tweet_count( '' );

Pinterest Pins

Pinterest is a social network that allows users to visually share, and discover new interests by posting (known as ‘pinning’ on Pinterest) images, videos and article or page bookmarks to their own or others’ boards (i.e. a collection of ‘pins,’ usually with a common theme) and browsing what other users have pinned.

To get the number of times a given URL have been shared to Pinterest, use the function code below:

$pinterest_pins = function ( $url ) {

	$api = file_get_contents( ' &url=' . $url );

	$body = preg_replace( '/^receiveCount\((.*)\)$/', '\\1', $api );

	$count = json_decode( $body );

	return $count->count;


echo $pinterest_pins( '' );

P.S. the output of the Pinterest API is not fully JSON because the JSON is encapsulated in a bracket prefixed with the text receiveCount. I had to eliminate the redundant bracket and text to make it a full JSON.

LinkedIn Share

To get count of LinkedIn shares a post have gotten, make an API call to .


To get the LinkedIn count via PHP, use the function below.

$linkedin_share = function ( $url ) {

	$api = file_get_contents( '' . $url . '&format=json' );

	$count = json_decode( $api );

	return $count->count;


echo $linkedin_share( '' );

StumbleUpon Stumbles

To retrieve the number of times visitors stumbled on your post or web page, use the code as written below.

$stumbleupon = function ( $url ) {

	$api = file_get_contents( '' . $url );

	$count = json_decode( $api );

	return $count->result->views;


echo $stumbleupon ( '' );

Google PlusOnes

All the API call made so far have all been GET request. The Google+ API require a POST request.
We won’t be using the file_get_contents() to send request to the API as it can’t send POST requests hence cURL will be used.

The function below query the Google+ API and returns the +1 count of a URL.

$google_plusones = function ( $url ) {
	$curl = curl_init();
	curl_setopt( $curl, CURLOPT_URL, "" );
	curl_setopt( $curl, CURLOPT_POST, 1 );
	curl_setopt( $curl, CURLOPT_POSTFIELDS, '[{"method":"pos.plusones.get","id":"p","params":{"nolog":true,"id":"' . $url . '","source":"widget","userId":"@viewer","groupId":"@self"},"jsonrpc":"2.0","key":"p","apiVersion":"v1"}]' );
	curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
	curl_setopt( $curl, CURLOPT_HTTPHEADER, array( 'Content-type: application/json' ) );
	$curl_results = curl_exec( $curl );
	curl_close( $curl );
	$json = json_decode( $curl_results, true );

	return intval( $json[0]['result']['metadata']['globalCounts']['count'] );

echo $google_plusones('');

So far, we’ve learned how to programmatically retrieve the share count of various social media networks from their respective APIs using PHP.

As previously mentioned in the introduction, a WordPress plugin that displays the share count of various social networks in a post using shortcodes is coming next in the second part of this series.

Until then, Happy Coding.


Social share counts are a double-edged sword. They can easily benefit the business when numbers are high and can completely discourage the customers when numbers are low. Therefore, it can be tricky to maximize on them. However, it does not mean you should give up on them.

Social share counts are an integral element of social media marketing strategy. Their advantages outweigh their shortcomings. Treat them with respect to achieve the desired result: put more thought into what social media platforms to show, where to place them in the reading flow, how to display them so that they catch attention but do not disrupt it from the primary marketing goal, and do A/B tests to see how the audience react to their presence.

Agbonghama Collins

Agbonghama Collins is a web developer by day and a freelance writer/blogger by night.

Posts by Agbonghama Collins