Skip to content

Instantly share code, notes, and snippets.

@topleague
Created June 9, 2017 09: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 topleague/0450279fd04b40605fd5ad4acaa01a41 to your computer and use it in GitHub Desktop.
Save topleague/0450279fd04b40605fd5ad4acaa01a41 to your computer and use it in GitHub Desktop.
Apply Relative Date Lengths in Genesis
// Apply Relative Date Lengths in Genesis
// (credit: http://www.billerickson.net/genesis-relative-date-length/)
add_filter( 'genesis_post_info', 'sp_post_info_filter' );
function sp_post_info_filter($post_info) {
if ( !is_page() ) {
$post_info = '<i class="fa fa-clock-o"></i> [post_date format="relative" relative_depth="1"] <i class="fa fa-eye"></i> [postview] [post_comments zero="0 Comments" one="1 Comment" more="% Comments"]';
return $post_info;
}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment