Skip to content

Instantly share code, notes, and snippets.

@alexkingorg
Created August 15, 2011 06:37
Show Gist options
  • Save alexkingorg/1145803 to your computer and use it in GitHub Desktop.
Save alexkingorg/1145803 to your computer and use it in GitHub Desktop.
ShareThis WordPress Plugin customization
<?php
// customizations to have ShareThis nicely integrated into FavePersonal.
// step 1, disable auto-addition to posts
// this adds the ShareThis button to the post sidebar for content posts only
if (function_exists('st_makeEntries')) {
add_action('favepersonal_content_sidebar_after', 'sharethis_button');
}
// this removes the JS from the head on pages that won't show the button
function akv3_remove_sharethis_js() {
if (!is_home() && !is_single()) {
remove_action('wp_head', 'st_widget_head');
}
}
add_action('wp', 'akv3_remove_sharethis_js');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment