Skip to content

Instantly share code, notes, and snippets.

@anwerashif
Created February 22, 2018 18:46
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 anwerashif/9b50ee9b0d0e62ba42a1e70906c9ba35 to your computer and use it in GitHub Desktop.
Save anwerashif/9b50ee9b0d0e62ba42a1e70906c9ba35 to your computer and use it in GitHub Desktop.
Customize the entry meta in the entry header
<?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