WordPress.org

Ready to get started?Download WordPress

Forums

Removing AddThis from Static Pages (7 posts)

  1. jzacsh
    Member
    Posted 5 years ago #

    Hi, I'm trying to remove my AddThis plugin's Button from my static pages, like "About Me" and "Contact" and "Home"... How do I do this? I tried searching the AddThis forums, and couldn't find anything: AddThis Comment

    I also tried searching these forums, but couldn't find it. I would think this would be a simple task. I don't see any Settings page for the plugin when I'm browsing my Admin Dashboard. I know I must be missing something.

    Any help would be greatly appreciated!

  2. greencode
    Member
    Posted 5 years ago #

    Does anyone know how to do this? I would only like "addthis" to appear only on Posts and not on the home page or other static pages. Help!!!

  3. fest
    Member
    Posted 5 years ago #

    It's pretty easy- just open addthis_social_widget.php file, go to line 110 (if you're using the newest version of this plugin) and change the line which reads:
    if (is_feed()) return $content;
    to
    if (is_feed() || is_page()) return $content;
    Voila, your static pages don't have this widget anymore.

  4. greencode
    Member
    Posted 5 years ago #

    Thanks for this - this has removed it from the static pages such as about and contact but the button still remains on each individual post on the home page. I only want the button to appear when the user clicks on the post link on the home page to view the individual post.

    Also, my theme always adds a border and padding to every image that's placed on the page - is there any way in the php file to add "padding:0; border:none;"?

  5. billydec
    Member
    Posted 5 years ago #

    nice - that was a much needed fix.

    I'm having an issue with positioning the SHARE link. I'd like to put a space between each post and the link...but each share link is on the very next line and it looks a little cluttered. How would I go about spacing it out?

  6. _mjk_
    AddThis Samurai
    Posted 5 years ago #

    FYI -- the button is now off static pages by default (since v1.5.3) and we added controls so that you can selectively turn it on there if desired.

    As for billydec's question, you should be able to just add your own CSS rule for our img container, which a div with the class "addthis_container".

    Best,
    Matt

  7. ljmac
    Member
    Posted 5 years ago #

    Hi _mjk_,

    I see you've added my number one feature request. Thanks! Now all we need is number two, and your plug-in will be perfect (well, apart from the fact that you can't make the drop-down work on ancient browsers like mine :-) ). I'd like the ability to add code to my posts and pages to either selectively enable or disable your plug-in on an individual basis. For example, I now have it disabled on static pages - which is my preference for most of them - but there's two pages I'd still like it to be enabled on. Is it possible to do this? AddToAny has this function, for example.

Topic Closed

This topic has been closed to new replies.

About this Topic