Posted By

thesislab on 10/31/09


php wordpress thesis ShareThis customfunctionsphp

Versions (?)

Who likes this?

2 people have marked this snippet as a favorite


Adding ShareThis button to single post *only* in Thesis

 / Published in: PHP


Once the automatic button placement for the ShareThis plugin has been deactivated, this function added to custom_functions.php will place the button on single posts only (not the home page).

  1. // Add ShareThis to single posts only
  2. function custom_byline() {
  3. if (is_single()) {
  4. ?>
  5. <p class="custom_byline">
  6. <?php if (function_exists('sharethis_button')) { sharethis_button(); } ?>
  7. </p>
  8. <?php }
  9. }
  10. add_action('thesis_hook_after_post', 'custom_byline');

Report this snippet  

You need to login to post a comment.