Skip to content

Instantly share code, notes, and snippets.

@amarilindra
Last active March 24, 2022 06:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amarilindra/aac84fcd23cd9d158f73 to your computer and use it in GitHub Desktop.
Save amarilindra/aac84fcd23cd9d158f73 to your computer and use it in GitHub Desktop.
Add this to code to your themes functions.php file to show last modified date in Genesis powered child themes
// Code for showing last updated date in Genesis Child Themes - (www.GeekDashboard.com)
add_filter( 'genesis_post_info', 'gd_post_last_modified_date' );
function gd_post_last_modified_date($post_info) {
if ( !is_page() ) {
$post_info = 'Last Updated on [post_modified_date] by [post_author_posts_link] [post_comments] [post_edit]';
return $post_info;
}
}
// Code for showing both published Date Last Updated Date in Genesis Child Themes - (www.GeekDashboard.com)
add_filter( 'genesis_post_info', 'gd_post_published_and_last_modified_date' );
function gd_post_published_and_last_modified_date($post_info) {
if ( !is_page() ) {
$post_info = 'Published on [post_date], Last Updated on [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