WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] share this > Display only in post? (9 posts)

  1. MTO
    Member
    Posted 7 years ago #

    Hello,
    I hope someone can help, I tried alexking's "share this" plugin, and loved it except for one issue: I only want to show the icon in the post itself, not in the main index page.

    How can this be done?
    There seems to be no option for it.

    Thanks

  2. MTO
    Member
    Posted 7 years ago #

    Just in case... this was in reference to the "share this" plugin here:
    http://alexking.org/projects/wordpress

  3. Chris_K
    Member
    Posted 7 years ago #

    After you unzip the download, have a look at the README.txt file.

    In particular, the Template Tags section.

  4. frotzed
    Member
    Posted 7 years ago #

    What HandySolo means (I assume) is that you're going to have to edit your plugin manually. I've done exactly what you are trying to do on my personal blog. Edit your Share-This plugin so these four lines look just like mine:

    @define('AKST_ADDTOCONTENT', false);
    // set this to false if you do not want to automatically add the Share This link to your content
    
    @define('AKST_ADDTOFOOTER', true);
    // set this to false if you do not want to automatically add the Share This form to the page in your footer
    
    @define('AKST_ADDTOFEED', true);
    // set this to false if you do not want to automatically add the Share This link to items in your feed
    
    @define('AKST_SHOWICON', true);
    // set this to false if you do not want to show the Share This icon next to the Share This link

    Then, you'll have to edit your single post template and insert this piece of code where ever you want the Share-This link to appear:
    <?php akst_share_link(); ?>

  5. Chris_K
    Member
    Posted 7 years ago #

    Yep, which is pretty much what's in that README file. ;-)

  6. frotzed
    Member
    Posted 7 years ago #

    Yes, it definitely is. I was just in the mood to be repetitively redundant :D

  7. MTO
    Member
    Posted 7 years ago #

    Thank you,
    It seems I completely missed the <?php akst_share_link(); ?> part.
    I guess its one of those times you have something in front of you and you just don't see it... Thanks for your help, patience, and for opening my eyes.

  8. KeenerLiving
    Member
    Posted 7 years ago #

    I have been using the <? php akst_share_link(); ?> code in my index.php and single.php files, and until this morning thought there was no problem with these.

    However, I ran some link checking software for my site and all of the "share this" code came back with a flag. In looking at it, it appears that the share this code is using the default numeric permalink addres generated by WordPress, whereas I use a date and name-based permalink structure. Hence, it appears that all of my share this links are going to be to invalid permalinks (to numbers rather than date and time based).

    Suggestions? I really do not want to go back to the default permalink structure.

  9. KeenerLiving
    Member
    Posted 7 years ago #

    Regarding my post above: it turns out to not matter. When one actually clicks on a site to share with (such as Digg), the right url is sent (that is, the url that contains the post name).

Topic Closed

This topic has been closed to new replies.

About this Topic