daily pastebin goal
79%
SHARE
TWEET

Untitled

a guest Nov 20th, 2017 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. // This particular example adds Hustle Social Sharing shortcode after content without editing template files on single posts/pages only.
  3. function jmorris_before_after($content) {
  4.         $beforecontent = '';
  5.         if ( is_single() ) {
  6.             $aftercontent = '[wd_hustle_ss id="jmorris-online"]';
  7.         } else {
  8.             $aftercontent = '';
  9.         }
  10.         $fullcontent = $beforecontent . $content . $aftercontent;
  11.        
  12.         return $fullcontent;
  13. }
  14. add_filter('the_content', 'jmorris_before_after');
RAW Paste Data
Top