WordPress.org

Ready to get started?Download WordPress

Forums

Share Buttons by AddThis
[resolved] Exclude AddThis from individual pages (22 posts)

  1. authentictech
    Member
    Posted 3 years ago #

    I want to show AddThis on most pages; however, I have some pages that are meant to be private and so obviously don't want people to be sharing the links.

    Is there a way, or can a feature be added to the plugin to exclude individual pages/posts?

    Thanks.

    http://wordpress.org/extend/plugins/addthis/

  2. BlaM4c
    Member
    Posted 3 years ago #

    +1

    No need to have a share button on my "contact form" :)

    It's quite easy to hack this into the code (by using custom post fields), but there should be an official way of doing this.

  3. Aaron Jorbin
    Member
    Posted 3 years ago #

    Thanks for the suggestion. I'll add it to my list of features for a future release. In order to not overcomplicate the UI, I'm thinking that it will require creating a custom field for the specific post/page that you don't want to have AddThis displayed on. Let me know if you have a better idea for the implementation.

  4. BlaM4c
    Member
    Posted 3 years ago #

    That's what I would do.

    Alternatively you could add a checkbox to the "Discussion" Meta Box.

    wp-admin/includes/meta-boxes.php -> do_action('post_comment_status_meta_box-options', $post);

    Not sure where to plug in for fetching and saving the data, but I'm sure theres some documentation somewhere ;)

  5. authentictech
    Member
    Posted 3 years ago #

    @jorbin, that's exactly what I had in mind (a simple exclude/include checkbox for every post/page), thanks.

  6. authentictech
    Member
    Posted 3 years ago #

    Additionally, for a later release perhaps, you could add in the settings page the ability to include/exclude categories, but the individual post exclusion is more important for me right now and probably more useful.

    Thanks again.

  7. Aaron Jorbin
    Member
    Posted 3 years ago #

    Sticking with the WordPress philosophy to design for the majority, I slightly disagree with you guys on this one. I think it's a rare enough instance that cluttering up most users interface would be more harmfull then good.

    For storage post meta is what makes the most sense to me.

  8. authentictech
    Member
    Posted 3 years ago #

    Which point are you disagreeing with? Could you also explain how are you ascertaining what the majority wants?

    Many thanks.

  9. BlaM4c
    Member
    Posted 3 years ago #

    Sure, cluttering the interface up is bad thing to do, but...

    • I think disabling the addthis functionality is similarily common to disabling comments or trackbacks - and there's a meta box for that in the editor ("Discussion").
    • If you don't need it, you can disable the meta box by either collapsing it or by hiding it completely.
    • The "BASIC USER" probably doesn't make use of custom fields. He's better off with a simple checkbox that's either on or off. That's just easier than having to remember which setting to use in the custom fields.

    If you're bothered about annoying someone by an additional checkbox (which I don't think would happen) you could also have another additional setting in your plugin settings to enable/disable the checkbox ]:-)

  10. authentictech
    Member
    Posted 3 years ago #

    Further to my last point, I don't think it's possible at this point to say that the majority would or wouldn't want this, unless you have explicitly asked via a poll or something. I'm all for not adding any and all arbitrarily requested feature but it seems to me like this one is a basic necessity. The absence of people asking for it can't really be taken as an indication of lack of desire.

    My strong suspicion is, if you did poll users of this plugin to ask explicitly if they wanted the ability to not show share buttons on certain pages I am certain the answer would be emphatically yes. Allowing people to share pages you don't want shared is a pretty big flaw. For example, one of my pages allows a download of a paid-for product. The page is hidden from navigation. Even though the download link on the page is protected by a script to prevent download without purchase, you can imagine that I don't particularly want boxes all over this page implicitly inviting people to share my download page with all-and-sundry on Facebook. Someone who couldn't write PHP scripts like this would have a problem.

    I am sure there are other types of pages where site owners would not want to implicitly encourage sharing by the appearance of the share buttons on the page—password protected pages, an obvious example. Another - a market research questionnaire or poll for mailing list subscribers only that you wouldn't want to hinder people from completing by adding a password but you don't want to risk people sharing the page with those outside your target group. On others, like contact forms, it just doesn't make sense.

    As BlaM4c said, I don't really see anyone being inconvenienced by this checkbox, and you can provide the ability to turn it off in the main settings page.

    The reality is, and I'm not saying this just to try and twist your arm, I would have to move to a different sharing service (or different AddThis plugin at least, if such a thing exists) if I can't exclude certain pages from sharing buttons.

    Thanks very much for your consideration.

  11. Aaron Jorbin
    Member
    Posted 3 years ago #

    Let me rephrase this since I don't want you to get the wrong idea (which my hastily worded response may have).

    The majority of the plugins users use our service in a traditional way, which is to have the buttons appear on every post. This is based on the number of URLS and domains that have addthis on them. Additionally, the lack of users speaking up does mean that this isn't a feature that a majority of our users are clamoring for.

    In the next release (which will be shortly), I'll include the option via a custom field. In a future release I'll add in an easier to use option for disabling AddThis on each post (though I am leaning strongly toward this being hidden and needing to be enabled via screen options).

  12. authentictech
    Member
    Posted 3 years ago #

    Thanks for your reply. I do wonder sometimes if the majority of users never ask for anything, or aren't aware that they can ask but I suppose, as you say, if it bothered them enough they would. Perhaps more would have as time goes on but, anyway, thanks for listening and for offering to provide a solution. I am very grateful.

  13. Aaron Jorbin
    Member
    Posted 3 years ago #

    The version released today allows for you to set addthis_exclude custom field to 'true' for it not to work. Next big release I'll add in a better UI/UX for this.

  14. authentictech
    Member
    Posted 3 years ago #

    Thanks, jorbin. The custom field works great. I really appreciate the quick response.

  15. ljmac
    Member
    Posted 3 years ago #

    Wow! I requested this feature literally years ago when your plug-in first came out, and had given up hoping to ever get it. Thanks for finally adding it!

  16. Motoristi
    Member
    Posted 3 years ago #

    Would it be possible to exclude by category as well?

    I have certain posts that are visible to a limited group of users (with Role Scoper) for a period of time and later I publish those to everyone by simply moving the posts to a public category. I would not want the group members to share a link that leads the public to a 404 during the restricted period.

    A simple field in the AddThis setting where one could put a comma separated list of excluded category IDs would be just fine.

  17. konradprojects
    Member
    Posted 3 years ago #

    Just writing to support this suggestion, since you think people not speaking up means they don't want it. Personally, I usually search for what I need and give up or find an alternate if I can't figure it out on my own. Generally too lazy to ask - others are probably like me.

    I currently post Addthis HTML buttons to the bottom of every post I make where I want to use it instead of using the plugin because I can't turn it off for specific categories. This messes up my RSS feed also. Even if turning Addthis on/off for categories isn't possible, I would at least like the ability to turn it on/off for each individual post at the user interface.

    The reason I need this feature is because the majority of my posts are image galleries with a particular look that the Addthis buttons interfere with. I only want the plugin to be active on my news blog posts. I'm sure someone with more knowledge than me could hack this, but I, like many users, am not a coder so we really need user interface options to control the plugin.

  18. Peter_L
    Member
    Posted 3 years ago #

    I have the same problem as the original writer of this post.
    I want to exclude the add-this share buttons from a certain page only (contact).
    This seems to be the answer to that:

    The version released today allows for you to set addthis_exclude custom field to 'true' for it not to work. Next big release I'll add in a better UI/UX for this.

    But I can't see it. I'm on the dashboard of my contact page looking at the screen options but there is no setting for the addthis there...
    What am I missing here?

  19. kjetilgf
    Member
    Posted 3 years ago #

    @jorbin
    I think the most user friendly way to exclude posts or page is if you add a simple form for it - like "Posts/pages to exclude - type ID's, separate with commas"
    Custom fields are still difficult to many users.

    @Peter
    You find Custom fields below the content field in the post panel. At the bottom of that panel you click Write new. Then type 'addthis_exclude' in the Name field to the left - and 'true' in the Value field to the right.
    Next time you'll find the addthis_exclude in the name dropdown menu, at the bottom of the Custom field panel.
    (If the labels are somewhat different, its just because I use a translated version of WordPress :o)

  20. Peter_L
    Member
    Posted 3 years ago #

    @kjetilgf
    Thank you, I get it now, works like a charm.

  21. Aaron Jorbin
    Member
    Posted 3 years ago #

    Version 2.1.0 now has a post meta box that you can enable from the screen options in both the post and page screens to disable addthis on a given post. Additionally, there is a filter( addthis_post_exclude ) that you can use if you want to programmatically remove addthis from posts. Marking this as resolved. Thanks for the suggestion and feedback from everyone.

  22. authentictech
    Member
    Posted 3 years ago #

    Thank you for being so open and responsive to feedback, one of the most of all plug-in authors I've encountered.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic