Disable Share Counts on a page template

EA Share Count includes a checkbox when editing a page, “Don’t display buttons on this page”. If you have a page template you always want it disabled on, and don’t want to manually check this on each of those pages, you can include this code in your page template:

* Disable Sharing
function ea_disable_social_sharing( $value, $post_id, $meta_key, $single ) {
if( 'ea_share_count_exclude' == $meta_key )
$value = true;
return $value;
add_filter( 'get_post_metadata', 'ea_disable_social_sharing', 10, 4 );
view raw page.php hosted with ❤ by GitHub

EA Share Count

Bill Erickson

Bill Erickson is a freelance WordPress developer and a contributing developer 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.

Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Let's Talk