Advice and answers from the Team

NOTE: If you're using the GetSocial WordPress plugin, please do not follow this guide, just select the option WordPress > GetSocial > Settings > Enable Multiple Share Bars on the same page (Sharing in Excerpts).

Some of our customers have endless scroll pages, which means they're presenting to their visitors many articles on the same page. By default, GetSocial allows you to have multiple share bars on a single page but only counts the shares for the active URL.

This meant that if a user visits the website and there are 4 different articles on the homepage, our share bar would present the share data for instead of each of the articles.

It's possible to add multiple instances of the same app (share bars essentially) with different data in the same page. This means that a single URL can have multiple share bars with share counts for each article.

Let's take the horizontal share bar for instance. The normal code for this feature is as follows:

 <div class="getsocial gs-inline-group"></div>

If you add this code, you'll get the horizontal share bar for your page. To add multiple instances of the share bar, you need to add a new parameter to your code, as follows:

 <div class="getsocial gs-inline-group" data-url="[EACH_POST_URL]"></div>

By adding to each share bar a custom URL, you'll be able to track shares for multiple articles or URLs on the same page.

Did this answer your question?