Return to Snippet

Revision: 19817
at October 31, 2009 19:35 by thesislab


Initial Code
// Add ShareThis to single posts only
	function custom_byline() {
		if (is_single()) {
		 ?>
			<p class="custom_byline">
				<?php if (function_exists('sharethis_button')) { sharethis_button(); } ?>
			</p>
	<?php }
		}
	add_action('thesis_hook_after_post', 'custom_byline');

Initial URL
http://testonly.philipbarron.net/archives/background-image/

Initial Description
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).

Initial Title
Adding ShareThis button to single post *only* in Thesis

Initial Tags
php, wordpress

Initial Language
PHP