Display share buttons using a shortcode

You can use [shared_counts] 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 this location, overriding the site-wide default style

Example:

[[shared_counts location="home-content" style="icon"]]Code language: JSON / JSON with Comments (json)

Published by Bill Erickson

Bill Erickson is a freelance WordPress developer and a contributor to the Genesis framework. For the past 14 years he has worked with attorneys, publishers, corporations, and non-profits, building custom websites tailored to their needs and goals.