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 […]
Category: Tutorial
Display share buttons using a shortcode
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 […]
Manually display share buttons using a function
You can call the display method within your theme or plugin file to include the share buttons. The “function exists” part ensures this code only runs if Shared Counts is active. You can also pass the following parameters to the display method: Location: adds a CSS class to the shared-counts-wrap so you can apply location-specific […]
Show total share count for “included total” field
The “Included Total” field in Shared Counts displays the sum total of counts across all the other buttons you’re displaying. It does not use the “total” value you see when editing a post. For instance, if you don’t include a Pinterest button on your site, it won’t include your Pinterest pins in the count total. […]
Use production URL when in development or staging
You can modify what URL is used to find share counts, and what URL is shared when a share button is clicked. This is useful when you’re building a website locally or in a staging environment and want to see the actual counts for the production (live) version of a post.