Support » Plugin: Share Buttons by AddThis » [Plugin: AddThis] How can I place this manually in my template and have it link correctly.

  • Tosh


    I put the <?php do_action( 'addthis_widget' ); ?> where I wanted it to be, but if for example I try to tweet the post I’m on while on the home page. It just tweets the home page instead of the post url???

    How can I fix this?

Viewing 8 replies - 1 through 8 (of 8 total)
  • I have the same issue, I inserted it in the home page inside the Post tag:

    <div class="entry"><?php do_action( 'addthis_widget' ); ?>
                   		<?php the_excerpt(); ?>

    but it share the whole website, not only the single post.

    But if I use it on Full Post page It works correctly.

    I ended up just having the plugin place it for me. I gave up on placing it manually.

    where is it placed automatically? because for me it shows under the post title but still share the whole page

    See here – It’s at the bottom of each post.

    The template tag supports custom URLs and titles:
    <?php do_action( ‘addthis_widget’, $url, $title); ?>

    Does that solve your problem?


    for me it works on individual posts (although in the code looks like the Brand title gets called instead of the post title and the url is missing entirely), but not on categories/archives. It’ll grab the title of the category rather than of the post. I even went in an added the addthis:url=”$url” addthis:title=”$title”, same issue.

    solution: add it automatically :\

    I solved it!

    This is just the single button which says share.

    <?php $url = get_permalink(); $title = the_title('','', false); ?><a class="addthis_counter addthis_pill_style" addthis:url="<?php echo $url; ?>" addthis:title="<?php echo $title; ?>"></a>

    However, it does not catch the post image because it still checks the page and not the post, will see if I can fix that to.


    It works with some images

    Not working!

    I want to display the button like on the example page above at

    So that it is under every excerpt

    AND I want to use custom images.

    Does anyone have some advice?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: AddThis] How can I place this manually in my template and have it link correctly.’ is closed to new replies.