• I’m trying to put a ‘ShareThis’ icon in the post meta section of my site (where the date is above the posts). I’m getting it to show up, but my problem is it links to my homepage and not the permalink to the post, so people won’t be able to bookmark individual posts.

    Here’s what I did in index.php-

    <div class=”post”>
    <div class=”title”>“><?php the_title(); ?></div>
    <div class=”meta”>
    <script type=”text/javascript” src=”https://w.sharethis.com/widget/?tabs=web%2Cpost%2Cemail&charset=utf-8&style=default&publisher=d01fb46c-ef31-4ea1-9235-44cb309d0e1f”></script&gt;
    <span class=”posted”>Posted on <?php the_time(‘F j, Y’); ?> in <?php the_category(‘, ‘); ?> by <?php the_author() ?></span><span class=”comments”><?php comments_popup_link(‘No Comments »’, ‘1 Comment »’, ‘% Comments »’); ?></span><div style=”clear: both;”></div></div>
    <div class=”entry”>
    <?php the_content(); ?>

    </div>
    </div>

    When I place the code in single.php the icon won’t show on the home page. Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Not sure, but I think you have to put it in every .php file where you want it to show up.

    Thread Starter mrtumnas

    (@mrtumnas)

    Right, and when I put it in index.php it does show up on the homepage, but when i click the icon, instead of bookmarking the post it bookmarks my domain (the homepage). When I put it in single.php and I load the permalink to the post it bookmarks the post. What I can’t seem to do is bookmark the individual posts from the homepage. I;m sure this has to be possible

    Hope I’m explaining this well enough

    I just use the option to automatically insert it at the end of each post, so it bookmarks the post, even from the front page. There’s also this:

    https://support.sharethis.com/publishers/publishers-faq/wordpress/66

    Sorry, probably not much help, but just in case you hadn’t seen that.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problems with ShareThis in Post Meta Section’ is closed to new replies.