Last active
March 24, 2022 06:05
-
-
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
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
// 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