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