The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

ShareThis: Free Sharing Buttons and Tools
[Plugin: ShareThis: Share, Email, Tweet, Like, +1 Made Simple] Some question to make it work as I wa (2 posts)

  1. B_Dark
    Posted 4 years ago #

    1. What do I have to do to put before and after the content of the post the style of the buttons that I have choosed?
    2. When someone clicks it to tweet it I want to be shown like this: Post Title http://www.mysite.com/post-title via @mytwitteraccount
    3. At http://sharethis.com/account/domains we put our Google Analytic ID for every domain to track on google analytics the sharethis buttons??


  2. sharethissupport
    Posted 4 years ago #

    1) Sharethis plugin adds buttons at the bottom of each post.
    In order to add sharethis buttons to top of each post, you'll need to add the buttons manually.
    Here are the steps:

    Sharethis script and span tags go on the page where you want the buttons to appear and they also determine what kind of button appears as well as what URL and title it shares. You will have to put 'script tags' in your Main index template(index.php) and 'span tags ' in Single Post template(single.php).

    Here is the basic span for just the ShareThis button: <span class=""st_sharethis"" st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText=""ShareThis""></span>

    You can change the class of the span to determine the button that appears. For example class=""st_twitter"" will make a twitter icon and class=""st_email_vcount"" will make a email vertical counter button.

    However, adding code in index.php and single.php will not display sharethis buttons on the blog page but will show buttons whenever an individual post is opened.
    If you wish to display sharethis buttons on the blog page ,you will have to put 'span tags' in (loop.php).

    In loop.php,
    1. put span tags just above the line "<div class="entry-utility">" to display buttons at the end of each post on the blog page.

    <span class='st_twitter' ></span>
    <span class='st_facebook' ></span>
    <span class='st_yahoo' ></span>
    <span class='st_gbuzz' ></span>
    <span class='st_email' ></span>
    <span class='st_sharethis' ></span>
    <div class="entry-utility">

    2) to display buttons at the beginning of each post on the blog page,put span tags just below the lines

    <h2 class="entry-title">" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></h2>
    <div class="entry-meta">
    <?php twentyten_posted_on(); ?>
    </div><!-- .entry-meta -->
    <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>

    2. You can customize the tweet by using the span tag property st_via :
    to add the reply i.e. @ , in span tag of twitter button like this:
    <span class="st_twitter" st_via='username'></span>

    3. It's not mandatory to add GA id for each domain from here:
    In order to integrate sharethis with GA , you'll need to follow the steps explained here:

    Hope this helps.
    In case of any issues, please feel free to ask us here: forums.sharethis.com .

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic