Support » Plugin: WordPress Share Buttons Plugin – AddThis » Include an option to turn off sharing tools by post

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Julka Grodel

    (@jgrodel)

    Hi Col. Blimp.

    Thanks for letting us know about your issue.

    Are you using a widget instead of automatically having the plugin add buttons above or below your posts? Turning sharing buttons off for a specific page only effects the buttons added in automatically above and below posts, not widgets.

    If you’re using the automatically added buttons, could you share a link with us to a page where it’s not working as expected?

    Thanks,
    Julka

    I mean the ‘Sharing Sidebar’ widget not the ‘Sharing Buttons Above/Below Content’ widget. There is an option added to every page ‘Share Buttons By AddThis’ and I took that to mean that no AddThis Buttons will appear on that page.

    Please make it so that the ‘Sharing Sidebar’ can be disabled on pages as one really does not want it on checkout pages and user account pages.

    test post for addthis sharing button

    I can’t turn addthis off in my post. I mean, I turned it off but it’s not working.
    I’m not using a widget–just the plugin.

    Hi @jgrodel,

    Is there a way we can disable/enable also the Sharing Sidebar on a per post/page basis using the “Share Buttons by AddThis” widget on/off switch?

    Thinking well about it, doesn’t makes much sense having that option at our posts backend editor while it actually doesn’t works to control the “Sharing Sidebar” style we want to use for our posts and pages. Having the possibility to control this one as well from that on/off radio buttons switch I think is a must for this plugin too. You guys should be able to support that in a next update.

    Thanks!

    Found a solution

    
    add_action( 'wp', 'ctrl_addthis_sidebar' );
    function ctrl_addthis_sidebar() {
    	if ( get_post_meta( get_the_ID(), '_at_widget', true ) == 0 ) {
    		global $AddThis_addjs_sharing_button_plugin;
    		remove_action( 'wp_footer', array( $AddThis_addjs_sharing_button_plugin, 'output_script' ) );
    	}
    }
    

    Published a Gist here https://gist.github.com/elvismdev/f505188a22b95de0fe45239e63098824

    • This reply was modified 2 years, 5 months ago by  Elvis Morales. Reason: Correcting code block format

    Where should I add this code please?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Include an option to turn off sharing tools by post’ is closed to new replies.