Created
July 4, 2015 16:18
-
-
Save salcode/d716ac2b0d13727b96b2 to your computer and use it in GitHub Desktop.
Update Genesis Post Info with Last Updated date in place of Publish Date. This code can be added to the end of functions.php or you can create this file genesis-last-updated-post-info.php in wp-content/mu-plugins/
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
// filter post_info to use 'Last updated' date | |
add_filter( 'genesis_post_info', 'fe_genesis_post_info_add_last_mod' ); | |
/** | |
* Change Genesis Post Info date to last modified date | |
* | |
* @since 0.1.0 | |
* | |
* @param string $post_info, string (with shortcodes) for post info | |
* @return string Genesis default post info with modified instead of publish date | |
*/ | |
function fe_genesis_post_info_add_last_mod( $post_info ) { | |
$post_info = | |
__( 'Last updated on', 'genesis-last-modified-post-info' ) . ' [post_modified_date]' | |
. ' by [post_author_posts_link] [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