I was wondering if there is a way to change the addtoany plugin so that when anyone tweets from my website inmcr.co.uk 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.
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....
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
https://twitter.com/intent/tweet?status=Welcome 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(https://dev.twitter.com/docs/tweet-button) or use some other plugin.
Navjot Singh answers:
You can use [[LINK href="http://wordpress.org/plugins/share-this/description/"]]Share This[[/LINK]] Plugin. It allows you to modify those fields from the settings only.