WordPress.org

Ready to get started?Download WordPress

Forums

Share Buttons by AddThis
[resolved] Add hashtag to tweet button + space between buttons (6 posts)

  1. seatpitch
    Member
    Posted 10 months ago #

    Hi,

    The sharing buttons are working well but I've got two questions...

    Firstly, how do I add a hashtag when people click the tweet button?

    For example, on this page (http://seatpitch.co.uk/2013/06/19/gonzalo-jara-reyes-returns-to-nottingham-forest/) I'd like the tweet to say 'Gonzalo Jara Reyes returns to Nottingham Forest http://seatp.it/143Byhj via @SeatPitch #nffc'

    How can I add '#nffc' to every tweet?

    Secondly, as you can see, there's a large space on either side of the Google+ button.

    How can I close this up?

    Many thanks

    http://wordpress.org/extend/plugins/addthis/

  2. srijith.v
    AddThis Samurai
    Plugin Author

    Posted 9 months ago #

    @seatpitch:

    For hashtags you need to use custom code. Something like

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

    You have to get the code to your liking from https://www.addthis.com/get/sharing and modify it to add hashtag. In WordPress admin panel, there is a section to add custom code.

    For the spacing,

    .addthis_button_tweet .at300b{
       width: 80px;
    }
    .addthis_button_google_plusone .at300b{
       width: 60px;
    }

    Above css will fix the spacing issue for your blog. The extra space was for to accomodate button size for various languages.

  3. seatpitch
    Member
    Posted 9 months ago #

    @srijith.v

    Perfect, thanks.

    A bit of fiddling and I managed to get there.

    Cheers

  4. srijith.v
    AddThis Samurai
    Plugin Author

    Posted 9 months ago #

    Nice to hear that!

  5. anasiqbalkhan
    Member
    Posted 4 months ago #

    Hi, Use this method. You can add these buttons in your single.php , post.php , page.php or anywhere.

    <!-- AddThis Button BEGIN -->

    <div class="addthis_toolbox addthis_default_style " style="padding: 0px 0px 0px 220px">
    <a class="addthis_button_facebook_like" fb:like:layout="box_count" style="padding-right: 20px"></a>
    <a class="addthis_button_tweet" tw:count="vertical" style="padding-right: 20px"></a>
    <a class="addthis_button_google_plusone" g:plusone:size="tall" style="padding-right: 20px"></a>
    <a class="addthis_button_pinterest_pinit" pi:pinit:layout="vertical" style="padding-right: 20px"></a>
    <a class="addthis_counter" style="padding-right: 20px"></a>
    </div>

    Never forget to add

    <script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
    <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-50f122333bf1d8a1"></script>

    Paste these scrips before closing </head> in header.php.

    cheers

  6. srijith.v
    AddThis Samurai
    Plugin Author

    Posted 4 months ago #

    @anasiqbalkhan: You may not need to edit the theme files, you can do it from the plugin itself as described above.

Reply

You must log in to post.

About this Plugin

About this Topic