Created
August 14, 2013 14:30
-
-
Save jgalea/6231591 to your computer and use it in GitHub Desktop.
Use the last updated date rather than publish date on posts.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'genesis_post_info', 'custom_post_info' ); | |
function custom_post_info( $post_info ) { | |
$u_time = get_the_time( 'U' ); | |
$u_modified_time = get_the_modified_time( 'U' ); | |
if ( $u_modified_time >= $u_time + 86400 ) { | |
$post_date = get_the_modified_time( 'F jS, Y' ); | |
} | |
else { | |
$post_date = get_the_time( 'F jS, Y' ); | |
} | |
$post_info = __( 'By', 'genesis' ) . ' [post_author_posts_link] ' . __( 'on ', 'genesis' ) . $post_date .' [post_comments] [post_edit]'; | |
return $post_info; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment