Created
February 22, 2018 18:46
-
-
Save anwerashif/9b50ee9b0d0e62ba42a1e70906c9ba35 to your computer and use it in GitHub Desktop.
Customize the entry meta in the entry header
This file contains hidden or 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
<?php | |
// Do NOT include the opening PHP tag | |
// Customize the entry meta in the entry header | |
add_filter( 'genesis_post_info', 'bg_entry_meta_header' ); | |
function bg_entry_meta_header( $post_info ) { | |
// get author details | |
$entry_author = get_avatar( get_the_author_meta( 'user_email' ), 30 ); | |
$author_link = get_author_posts_url( get_the_author_meta( 'ID' ) ); | |
// build updated post_info | |
$post_info = sprintf( '<span class="author-avatar"><a href="%s">%s</a></span>', $author_link, $entry_author ); | |
$post_info .= '[post_author_posts_link] [post_modified_date before="Last updated on "]'; | |
return $post_info; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment