Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Change plugin WordPress


I was wondering if there is a way to change the addtoany plugin so that when anyone tweets from my website it suggests that you follow an account of my choice and not the developers (as in the picture attached).

I have asked the developer via forums many times whether this can be done but there has been no reply.

If I succeed in changing this plugin I will contact the developer and let him know.

Any help appreciated.



Answers (3)


John Cotton answers:

Try inserting this at line 420 of add-to-any.php in the latest version of the plugin:

$custom_attributes .= ' data-related="mytwitterhandle: Some Description of My Website"';

That should work.

Clearly it's the kind of thing that should be a setting in the plugin so that you can customise without editing the source but that's too much code to put here,

John Cotton comments:

<blockquote>Add to any is changing data-related attribute. So whatever we set it again convert it back to their own account.</blockquote>
If that's the case then you're stuffed.

That's one reason why it's better to code these things yourself rather than relying on a plugin....


Bob answers:

Add to any is changing data-related attribute. So whatever we set it again convert it back to their own account.

If you see the final url created by add to any for twitter it will look something like this

and if you urldecode it looks like this to WordPress. This is your first post. Ediā€¦ http://localhost/sites/japan/?p=1&related=micropat&via=AddToAny

Notice related=micropat in above url.

In other word you can not do it with add to any. you have to put separate tweet button using twitter api( or use some other plugin.


Navjot Singh answers:

Its impossible to do this via Add to Any plugin since they add their accounts at runtime using a javascript file hosted at their own site. You may need to use another plugin.

You can use [[LINK href=""]]Share This[[/LINK]] Plugin. It allows you to modify those fields from the settings only.