Advertisement
daymobrew

Genesis - Show Updated when post has been modified.

Jun 10th, 2019
651
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. <?php
  2.  
  3. add_filter( 'genesis_post_info', 'dspip_post_info', 20 );
  4. function dspip_post_info( $post_info ) {
  5.     $diff = '';
  6.     // If the post was modified after the publishing date then show the modified date.
  7.     if (get_the_modified_time( 'Ymd' ) > get_the_time( 'Ymd' ) ) {
  8.         return $diff .'Published: [post_date] (Updated: [post_modified_date])';
  9.     }
  10.     else {
  11.         return $diff .'Published: [post_date]';
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement