By james, 12 December, 2022
Advent Calendar door 12 containing AddToAny Share Buttons

It’s day 12. Can you believe it? Half way through the calendar already.

Today’s module is a simple, but useful one: AddToAny Share Buttons.

This module is designed to help visitors to your site to share your posts to social media sites or email. It is another one that you can install and just let it do it’s thing.

There are a few options for customisation, but it works fine with the default settings. You may find it helpful to change the default list of icons to display, for example.

Config page for AddToAny Share Buttons

Once enabled, posts will have a set of sharing buttons added below them.

The AddToAny sharing buttons desplay below posts

The “+” icon will pop up additional sharing options.

The popup showing additional sharing options

One minor issue I had was that when using the External Links module that I shared on day 4, there can be a conflict. External Links was incorrectly interpreting the AddToAny button as an external link, and adding its icon, and this was pushing the add button out of its box, making it invisible. Since AddToAny activates JavaScript, it doesn’t take the user off site, so it doesn’t require the External Links icon at all.

Thankfully, there is an easy workaround. In the External Links settings, you can add CSS selectors to exclude under the “CSS Matching” section. I added “.a2a_kit”, and that told External Links not to mess with the AddToAny section, and everything was perfect. I did get caught out at first because I only put the class name in the field, and it didn’t do anything. It turns out the full CSS selector is needed, so in this case I needed to add the leading full stop.

One other minor issue I found is that my current favourite social media platform, Mastodon, is not included. I’m not sure that’s an omission that can easily be corrected. As Mastodon is made up of thousands of federated servers, there is no way for a site to know what the current visitor’s server is, and one of the key points of Mastodon is there isn’t a centralised server to go through. None of this is AddToAny’s fault, of course.

So that’s today’s entry. Hope you’ll stick with me for the second half of the calendar. I still have some of my favourite modules to come!

Advent Calender with door 12 open containing AddToAny icon



Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.