<?php | |
// This particular example adds Hustle Social Sharing shortcode after content without editing template files on single posts/pages only. | |
function jmorris_before_after($content) { | |
$beforecontent = ''; | |
if ( is_single() ) { | |
$aftercontent = '[wd_hustle_ss id="jmorris-online"]'; | |
} else { | |
$aftercontent = ''; | |
} | |
$fullcontent = $beforecontent . $content . $aftercontent; | |
return $fullcontent; | |
} | |
add_filter('the_content', 'jmorris_before_after'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment