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

Change plugin WordPress

  • SOLVED

Hi,
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.

Thanks

Jon

Answers (3)

2014-01-13

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....

2014-01-13

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

https://twitter.com/intent/tweet?status=Welcome%20to%20WordPress.%20This%20is%20your%20first%20post.%20Edi%E2%80%A6%20http%3A%2F%2Flocalhost%2Fsites%2Fjapan%2F%3Fp%3D1&related=micropat&via=AddToAny

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.

2014-01-13

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="http://wordpress.org/plugins/share-this/description/"]]Share This[[/LINK]] Plugin. It allows you to modify those fields from the settings only.