Advertisement
srikat

Untitled

Feb 17th, 2014
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.73 KB | None | 0 0
  1. add_action( 'genesis_before_entry_content','sri_add_date');
  2. function sri_add_date () {
  3.  
  4.   if ( is_home() || is_archive() || is_singular('post' ) ) { ?>
  5.         <div class="my-date">
  6.             <span class="my-date-day"><?php echo do_shortcode("[post_date format='j']"); ?></span>
  7.             <span class="my-date-month"><?php echo do_shortcode("[post_date format='M']"); ?></span>
  8.         </div>
  9.     <?php }
  10.  
  11. }
  12.  
  13. //* Customize the post info function
  14. add_filter( 'genesis_post_info', 'sp_post_info_filter' );
  15. function sp_post_info_filter($post_info) {
  16.  
  17.     if ( is_home() || is_archive() ) {
  18.         $post_info = '[post_comments] [post_edit]';
  19.     }
  20.     else {
  21.         $post_info = '[post_date] by [post_author_posts_link] [post_comments] [post_edit]';
  22.     }
  23.     return $post_info;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement