You can display the author box on your Genesis themes on single posts and archive pages. The author box contains the author name, Gravatar and bio.
Enable on single posts
This is useful to bring attention to the author of the article. It features the author’s name, photo and short bio.
Below is the code to globally enable the Author Box on single posts:
[php title="functions.php"] //* Display author box on single posts add_filter( 'get_the_author_genesis_author_box_single', '__return_true' ); [/php]
Remove on single posts
Some themes come with the author box enabled by default. You can remove the author box using the following code:
[php title="functions.php"] //* Remove the author box on single posts XHTML Themes remove_action( 'genesis_after_post', 'genesis_do_author_box_single' ); //* Remove the author box on single posts HTML5 Themes remove_action( 'genesis_after_entry', 'genesis_do_author_box_single', 8 ); [/php]
Enable on archive pages
You might want to enable the author box on archive pages if you have only one author. If there are posts by multiple authors in the archive, you won’t see all the author boxes.
Below is the code to globally enable the Author Box on archive pages:
[php title="functions.php"] //* Display author box on archive pages add_filter( 'get_the_author_genesis_author_box_archive', '__return_true' ); [/php]
One response to “Enable the Genesis author box”