Creating new button styles

Shared Counts includes many style options built-in, but you can also create your own custom styles using the shared_counts_styles filter.

The styles are added as a class on the .shared-counts-wrap container. If you’re using the “Fancy” style, it adds a class of .style-fancy which you can use to target CSS (example).

The following code adds a new style option called “Big Block” which you can style using .style-big-block.

This code snippet goes in a core functionality plugin or Code Snippets.

Filters used:

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.