Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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