WordPress.org

Ready to get started?Download WordPress

Forums

ShareThis: Share Buttons and Social Analytics
Insert in the beginning of the posts/pages (2 posts)

  1. kofoe
    Member
    Posted 1 year ago #

    I am trying to insert share this in the beginning of my posts...not in the end
    How to configure this?

    http://wordpress.org/extend/plugins/share-this/

  2. sharethissupport
    Member
    Posted 1 year ago #

    Hello,
    Unfortunately, changing the position of ShareThis buttons is not supported right now.
    We may include this feature in the future releases. We can provide you guidelines to add the ShareThis code manually to your blog to achieve this.

    You can add the buttons the way you want by following these instructions.
    --
    Sharethis 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. To display buttons at the end of each post on the blog page. put span tags just above the line "<div class="entry-utility">"

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

    Please note that you might need to do a few tweaks as different WordPress themes can have different implementations of template.

    [ Signature moderated. ]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.