WordPress.org

Ready to get started?Download WordPress

Forums

ShareThis: Share Buttons and Social Analytics
[Plugin: ShareThis: Share Buttons and Sharing Analytics] Sharing the post on a category page/blog pa (6 posts)

  1. chadhugo
    Member
    Posted 1 year ago #

    Hi,

    I want the ShareThis button to appear at the top of each posts , after the date (and ** comments) as shown here

    I think i have to do this manually, ( as said here )

    (i'm using "u-design" theme, so that may be a little bit different)
    I've put the span tags i need in archive.php, page-Blog.php, and single.php. It looks like this :

    </span>   /   <?php comments_popup_link( __( 'Leave a comment', 'udesign' ), __( '1 Comment', 'udesign' ), __( '% Comments', 'udesign' ) ); ?>   /   <span class='st_twitter' ></span> <span class='st_facebook' ></span> <span class='st_fblike' ></span> <span class='st_plusone' ></span> <?php edit_post_link(__('Edit', 'udesign'), '<div style="float:right;margin:0 10px;">', '</div>'); ?>

    The place is ok, for the single article pages, its ok too.
    But when i'm on the blog page (which shows excerpts), if i click on the twitter button for example, it shares the blog page, not the post.
    It's the same with the category pages (which shows excerpts too). For example if i'm on the "sports" category and if i want to share an article from this page, if i click on the twitter button, it'll share the "Sports page", not the article.

    I think it has something to do with st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); but i dont know what to do...

    Thankd i advance, and sorry for my worpress/php newbiness and my bad english

    (btw, i have another problem, the facebook like and google+1 buttons are really slow to appear, is it normal?)

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

  2. sharethissupport
    Member
    Posted 1 year ago #

    Hi sir,
    Yes, you will have to modify the sharethis span tags to be added to the code of the site like this:
    <span class="st_sharethis" st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText="ShareThis"></span>

    Please modify all the span tags added to your blog as above and let us know if it doesn't solve your issue.
    Please note that Sharethis uses native fblike and G+1 buttons.
    Regards,
    SharethisSupport Team

  3. chadhugo
    Member
    Posted 1 year ago #

    Sorry, i don't really understand

    i only want the fb share, twitter, fblike ang g+ buttons (but if the fblike and g+ buttons are too slow, i could remove them...), i dont need the sharethis green button.

    where do i need to change this, and what do i have to change exactly?
    <span class="st_sharethis" st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText="ShareThis"></span>

    if i go to the ShareThis config page -> modify the html tags, i have this :
    <span class='st_facebook' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='facebook'></span><span class='st_twitter' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='twitter'></span>
    i've tried to change the ' with " (because its the only difference i see with what you've written) but its the same thing...

    its not a problem with your plugin, because if i i choose "Automatically add ShareThis to your posts?*", i have other buttons at the bottom of the posts, and they are working, even in a category page
    (i.e i have 2 lines of buttons : the one added in the php code, wich dont share the right url, and the one automatically added, which works"

  4. chadhugo
    Member
    Posted 1 year ago #

    ok, i think i've understand, i only need to put the <span class="st_sharethis" st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText="ShareThis"></span> codes in the php files, and it works

    thanks

    i've removed the facebook like button, its too slow.
    the other buttons are a little bit slow too, but it'll be ok..
    (but the g+ button is one pixel down)

  5. sharethissupport
    Member
    Posted 1 year ago #

    Hello sir,
    In order to add the buttons at the top of each post,you will have to add the sharethis code manually(modifying the sharethis code from sharethis plugin configuration page won't work) to your blog as explained here:
    http://wordpress.org/support/topic/plugin-sharethis-share-email-tweet-like-1-made-simple-how-to-place

    Please note that you can get the code of the buttons(by selecting the website platform) from here:
    http://sharethis.com/publishers/get-sharing-tools
    and then modify the sharethis span tags as follows:

    <span class='st_facebook' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='facebook'></span>
    <span class='st_twitter' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='facebook'></span>
    <span class='st_fblike' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='facebook'></span>
    <span class='st_plusone' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='facebook'></span>

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum's parser.]

    If you still have any queries or want us to add the code to your blog,please provide the admin credentials of your blog.
    You can mail us the admin credentials here: support@sharethis.com

    Thanks,
    SharethisSupport Team,
    [sig moderated as per the Forum Rules. Please stop posting them.]

  6. chadhugo
    Member
    Posted 1 year ago #

    yes thanks, as i said, its working now

    (that was my fault, i didnt understand that i had to put the full "spans" code directly in the php code)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.