Created
June 9, 2017 09:05
-
-
Save topleague/0450279fd04b40605fd5ad4acaa01a41 to your computer and use it in GitHub Desktop.
Apply Relative Date Lengths in Genesis
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
// 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