See How can I move both the button and the individual icons to another area of my theme?. You’ll probably want to place the suggested code in at least your theme’s single.php file. From there you’ll have much finer control. 🙂
The problem is, I want to selectively add AddtoAny buttons in certain posts in certain locations mid-post-content.
The PHP code won’t help me because that is for placing the button consistently in the same location on every page, the opposite of what I need.
Not to mention you can’t insert PHP to the middle of a wordpress post (inside a HTML Table for instance).
Is there a way to get the <!--sharesave-->
to work properly? The <!--nosharesave-->
does in fact work.
So what you’re seeking for the plugin is a feature request, but it might be best to use AddToAny’s generic code instead of the WordPress plugin.
Right now <!--nosharesave-->
just omits the default button from the bottom of posts, and <!--sharesave-->
includes the button (if the button is not set to be automatically included at the bottom of posts).
I think the best solution is to generate the button code when you need it and place that in your posts as desired.
One caveat is that this won’t work elegantly if you’re using the plugin (due to the plugin’s special load optimizations). If you wish to also place the buttons persistently in your template, also use the generic code in your theme’s template files.
Ah, now I understand. For some reason, I was under the impression that the <!--sharesave-->
would insert the button wherever that tag was inserted. I now understand that is not the case – it is simply a toggle to enable the standard bottom-of-the-page button to show, regardless of where the sharesave tag itself is inserted.
I wanted to avoid using the website button code because of its reference to off-site Javascript and images. I believe I can improve my visitors’ pageload performance by hosting as much code/images on my site as possible, and minimizing 3rd party domain references.
I guess I will have to use a hand edited combination of the button code and local copies of the stuff. This is the type of thing I hoped to avoid by using the plugin in the first place. But I still appreciate your helpful responses here!
No problem, glad I was able to clarify. 🙂
Both the generic code and the plugin use AddToAny’s hosted script. Used widely for over 3 1/2 years (billions of times a month), performance has always been top-notch and a priority. The static content is served from a fast and reliable CDN with efficient use of expires headers & compression.
If performance is of upmost importance or policy dictates, and you have shell access and are able to set a cron job, you can fully cache the AddToAny script and images on your server(s). Feel free to check out the code caching program: http://www.addtoany.com/buttons/host_cache/