-
-
Save billerickson/4d74f188c09ff0402e3e822162815a50 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove Shared Counts from sponsored posts | |
* | |
* @see | |
* @author Bill Erickson | |
*/ | |
function be_remove_shared_counts_from_sponsored_posts( $locations ) { | |
if( is_single() && has_category( 'sponsored' ) ) { | |
$locations['before']['hook'] = false; | |
$locations['before']['filter'] = false; | |
$locations['after']['hook'] = false; | |
$locations['after']['filter'] = false; | |
} | |
return $locations; | |
} | |
add_filter( 'shared_counts_theme_locations', 'be_remove_shared_counts_from_sponsored_posts' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment