Support » Plugin: Share Buttons by AddThis » [Plugin: AddThis] Using tw:hashtags with the WordPress Plugin

  • Resolved RockoRobotics


    From within the AddThis settings in the WordPress Admin area, I am trying to build a custom AddThis Twitter Button. My goal is to use something like this:

    <a class="addthis_button_tweet" tw:hashtags="#hashtags"></a>

    However, when I save the settings, the tw:hastags portion of the button is removed. The rest of the of the code remians. Other attributes, such as tw:text work as expected. Is there something simple that I am just missing?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Srijith V


    @rockorobotics: Let me have a look. What’s the WP version & AddThis plugin you are having? If possible, share the string you are trying to save in settings.

    The WordPress Version is 3.4.1 and I have tried this with the past few versions of the plugin, including the latest version 2.5.0.

    I cannot give the exact string I am trying to save because of client confidentiality reasons.(I work for a web design company and it is part of how the company operates). However, I have tried a variety of different text strings inside the tw:hashtags and it is always removed.

    I have tried using this plugin on a blog with a different theme and only one other simple custom plugin active and the issue still persists. Perhaps you can give me an example of a tweet button that you know works and I can work from that.

    Plugin Contributor Srijith V


    @rockorobotics : You are right. Let me try for an easy fix for this. Thanks for pointing it out.

    Plugin Contributor Srijith V


    @rockorobotics: Try this one.

    In addthis_settings_functions.php, around line #33 you can see the following lines :-

    $mytags['a'][ 'twurl' ]= array();
    $mytags['a'][ 'twvia' ]= array();
    $mytags['a'][ 'twtext' ]= array();

    Just add the line below it :-

    $mytags['a'][ 'twhashtags' ]= array();

    And in the wordpress settings text area for custom tags you just need to input

    <a class="addthis_button_tweet" tw:via="srijithv" tw:hashtags="foo,bar"></a>

    Please note that # is NOT to be prefixed for “foo”, “bar” etc in the input tag, it will be added automatically.

    If you are not confident enough in handling the code, please let me know. Thanks again for reporting this. I have added this fix to the upcoming release.

    Plugin Contributor Srijith V


    @rockorobotics: My bad! It might not work as expected. I am checking it out here. Will update you as soon as possible.

    I tried your fix and it appears that the issue has been resolved. Thank you for your help.

    Plugin Contributor Srijith V


    Wonderful! Some one here flipped a switch when I tried and made my test fail. Good that it works now.
    We will be releasing an update to the plugin in a day, and it will have the modified change to allow hashtags. Thanks for pointing it out!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: AddThis] Using tw:hashtags with the WordPress Plugin’ is closed to new replies.