Last active
June 5, 2016 01:43
-
-
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/
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
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