Shared Counts loads a stylesheet which contains the styling for the many style options offered by this plugin. You can prevent our stylesheet with the following code:
This code snippet goes in a core functionality plugin or Code Snippets.
add_filter( 'shared_counts_load_css', '__return_false' );
Code language: JavaScript (javascript)
Make sure you include your own styling for the Shared Counts buttons in your theme’s stylesheet.
Disable JavaScript
Shared Counts includes a JavaScript file for the following functionality:
- Open, close, and submission of the “Share by Email” modal
- Google Analytics social tracking, allowing you to see when people interact with your sharing buttons
- Optimize the size of the new windows opened when clicking a share button
You can disable our JavaScript file with the following code:
This code snippet goes in a core functionality plugin or Code Snippets.
add_filter( 'shared_counts_load_js', '__return_false' );
Code language: JavaScript (javascript)
Make sure you account for the lost functionality in your own theme’s JavaScript file. For instance, if you use the Email sharing icon, you will need to manually implement the email sharing modal.
Filters used:
shared_counts_load_css
shared_counts_load_js