Skip to content

Instantly share code, notes, and snippets.

@srikat
Last active June 5, 2016 01:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srikat/eba8dd7b1f18a24c2a66ae3024df1fff to your computer and use it in GitHub Desktop.
Save srikat/eba8dd7b1f18a24c2a66ae3024df1fff to your computer and use it in GitHub Desktop.
Display author box on author archives incl. paged pages. https://sridharkatakam.com/display-author-box-pages-author-archives-genesis/
remove_action( 'genesis_before_loop', 'genesis_do_author_box_archive', 15 );
add_action( 'genesis_before_loop', 'sk_do_author_box_archive', 15 );
/**
* Add author box to the top of author archive.
*
* If the headline and description are set to display the author box appears underneath them.
*
* @since 1.4.0
*
* @uses genesis_author_box() Echo the author box and its contents.
*
* @see genesis_do_author_title_and_description Author title and description.
*
* @return Return early if not author archive.
*/
function sk_do_author_box_archive() {
if ( ! is_author() )
return;
if ( get_the_author_meta( 'genesis_author_box_archive', get_query_var( 'author' ) ) )
genesis_author_box( 'archive' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment