Shared Counts stores the total share count as post metadata using the shared_counts_total key. This lets you easily query for popular content Query with code To query for a list of your posts with the highest share count: You can also combine this with more advanced queries. Here’s a list of posts published in the […]
In Settings > Shared Counts you can control the site-wide settings for which share buttons are shown and where they appear (before and/or after content). For more fine grained control, you can use the shared_counts_display_services filter (added in version 1.3) to customize which services are available in each location. You might also be interested in […]
In Settings > Shared Counts you can select a button style and whether they appear above and/or below the post content. But what if you want to use different button styles in those locations? You can use the shared_counts_theme_locations filter to customize the settings for each location. Let’s say you want to use the “Classic” […]
Shared Counts includes buttons for the most popular social sharing platforms, and you can use the built-in filters to add support for additional services. The code below adds a Reddit share button. Note that this will not increase the total share count when shared on reddit. This only adds a sharing button. Here’s some information […]
When using the “Included Total” field with the Icons style, the output looks something like this: With the following code, you can change it to “Shares” for multiple shares, or “Share” if there’s only one share, like this:
Shared Counts lets you specify where in a post the share buttons appear (before and/or after content). You can also exclude them on a specific post using the metabox when editing that post. For even more control, you can use the locations filter to move or remove the share buttons programmatically. The code below removes […]
The following code snippet will add your twitter username to the end of a tweet shared from your website. Make sure to change “billerickson” to your twitter username.
If you’re using the “Included Total” option to display your total share count, the code below will let you hide the count if it is below a certain threshold. In the code below, we are only showing the total if it is greater than 100.
You can set Shared Counts to automatically insert the buttons before and/or after the content of your page. The hook or filter used will depend upon your theme (see the code here): If you are using a Genesis theme: “Before” uses the genesis_entry_header hook with a priority of 13 “After” uses the genesis_entry_footer hook with […]
You can use FacebookTweetPinEmailPrint shortcode to display share buttons anywhere in your page’s content. Here are the optional attributes you can add to customize the display: location: adds a CSS class to the shared-counts-wrap so you can apply location-specific styling. By default it automatically has the location of “shortcode” style: specify a button style for […]