Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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');
Add Comment
Please, Sign In to add comment