Forums

ShareThis: Share, Email, Tweet, Like, +1 Made Simple
Via @username on Twitter (4 posts)

  1. adambockler
    Member
    Posted 8 months ago #

    I'd like to add text to my Twitter post saying, "via @username" to increase my followers. In other words, when users shared it, the entire post would read something like, "This is the post title, via @username."

    Where would I add this in the plugin?

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

  2. sharethissupport
    Member
    Posted 1 month ago #

    Hi,
    You can add reply(@) to tweet by using the span tag as:
    You can change the reply i.e. @ by using the parameter st_via in span tag of twitter button like this:

    <span class="st_twitter" st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText="Twitter" st_via='username'></span>

    but right now it's a bug in our plugin that when html is modified from here:
    Click to view/modify the HTML tags

    and settings are updated, the modifications aren't saved.
    Our dev team is working on the issue to fix it as soon as possible.

    You can add the buttons manually in order to provide the reply in tweet:
    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"><a>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></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. ?>

    [ Code edited with backticks. Moderator note: when sharing code examples, please wrap the code in backticks or use the code button. ]
    Hope this helps.
    In case of any issues, please feel free to contact us.
    Regards,
    SharethisSupport

  3. MJEG
    Member
    Posted 3 days ago #

    has ShareThis fixed this problem yet? I also would like to be able to at the via @ but when I try to edit the html file any changes i make get stripped right out

  4. sharethissupport
    Member
    Posted 9 hours ago #

    Hi @MJEG,

    We have fixed the issue and the updated plugin will be released soon.

    Thanks,
    SharethisSupport

Reply

You must log in to post.

About this Plugin

About this Topic

Tags