SHARE
TWEET

Untitled

a guest Feb 22nd, 2012 214 Never
  1. /** Customize the post info function */
  2. add_filter( 'genesis_post_info', 'bg_post_info' );
  3. function bg_post_info($post_info) {
  4.        
  5.         if ( is_singular( 'post' ) ) {
  6.                 $post_info = '[post_date] by [post_author_posts_link] [post_comments] [post_edit] <a href="https://twitter.com/share" class="twitter-share-button" data-via="studiopress" data-lang="en">Tweet</a>
  7. <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>';
  8.         }
  9.  
  10.         else {
  11.                 $post_info = '[post_date] by [post_author_posts_link] [post_comments] [post_edit]';
  12.         }
  13.  
  14.         return $post_info;
  15. }
RAW Paste Data
Top