Skip to content

Instantly share code, notes, and snippets.

@reasonstousegenesis
Last active August 29, 2015 14:20
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 reasonstousegenesis/f639b94392012df2c262 to your computer and use it in GitHub Desktop.
Save reasonstousegenesis/f639b94392012df2c262 to your computer and use it in GitHub Desktop.
Output the 'last updated' date in relative terms
<?php
// Paste the code BELOW this line into your child theme functions.
/**
* Output the 'last updated' date in relative terms
*
* @author Reasons to Use Genesis
* @link http://reasonstousegenesis.com/last-updated-date/
*/
add_filter( 'genesis_post_info', 'rtug_last_updated_date_relative' );
function rtug_last_updated_date_relative() {
return 'Last updated [post_modified_date format="relative"]';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment