Support » Plugin: Shared Counts - Social Media Share Buttons » Style Getting Stripped

  • Resolved Clayton Chase


    Hey guys,

    I’m loading Shared Counts via a shortcode into an Ajax Load More: Repeater Template. All seems to be working but the style looks like it’s getting stripped. Any idea as to why that would be happening? Thank you!


    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Bill Erickson


    The issue is that the Shared Counts stylesheet isn’t loading. The stylesheet is only enqueued if the share buttons are called when the page is loaded, and if you’re loading them via AJAX then they wouldn’t be in place on initial load.

    You can resolve this by telling Shared Counts the buttons are loading on the page. Add this to your theme’s functions.php file:

    if( function_exists( 'shared_counts' ) {
    	shared_counts->front->share_link = true;

    This will load the styles site-wide. You can add your own conditionals to that to better reflect where you want the styles loaded (ex: if( function_exists( 'shared_counts' ) && is_category() ) )

    Thread Starter Clayton Chase


    Thank you Bill! Makes total sense.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Style Getting Stripped’ is closed to new replies.