• Resolved bprymicz

    (@bprymicz)


    I don’t have a link to a site, yet, but I will work on that. However I added this following clip to my functions.php:

    
    function custom_add_this_filter($enable) {
      $enable = false;
      return $enable;
    }
    add_filter('addthis_sharing_buttons_enable', 'custom_add_this_filter', 100, 1);
    

    Obviously the plan is to put some conditional logic there to not show AddThis on pages that are protected. However, even though this filter is running, the AddThis is always being shown.

    Thanks for any suggestions.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Leland

    (@addthisleland)

    Hi Brad!

    Thanks for contacting AddThis Support 🙂

    If you login with your AddThis account through the WordPress plugin, you can specify what pages you want the share buttons to show/hide base on its URL structure which you can configure in the AddThis.com dashboard.

    -https://www.screencast.com/t/DpslcD2T3Fjj

    Let me know if you have any further questions!

    Thanks,
    Leland

    Thread Starter bprymicz

    (@bprymicz)

    Unfortunately that doesn’t always work when adding it to a legacy site with hundreds of articles.

    The documentation included with the plugin gives and example of what I need to do, it’s just not working. It needs to be dynamic based on whether or not the post is public or secured by a membership.

    Here’s the documentation I’m referring to.
    https://plugins.svn.ww.wp.xz.cn/addthis-all/trunk/documentation.filters.md

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘addthis_sharing_buttons_enable filter not working’ is closed to new replies.