A long-time feature of Genesis is what is called an author box. This is a box that corresponds to an author and includes:
- a heading of ‘About Brian Gardner’, where ‘Brian Gardner’ is the author’s preferred name
- the author’s picture, which is the Gravatar associated with his/her email address
- the author’s biographical info.
The author box can be included at the top of author archives on a per-author basis.
By default, the author box outputs after the opening
<main class="content"> (HTML5) or
<div id="content"> (XHTML) tag, after the archive headline (if one exists) and after the breadcrumb trail (if breadcrumbs are turned on), but before the posts.
However, Genesis makes it easy to reposition the author box to any place that may better suit your design, or even remove it from all authors’ archives altogether.
The function responsible for outputting the author box on author archives is
This function checks if page 1 of an author archive is being displayed (unlike the archive headline, which displays on every page of the archive), and that the relevant author has agreed to display an author box via their user profile settings. If both conditions pass, it outputs the author box via
genesis_do_author_box_archive is hooked to
genesis_before_loop at priority 15.
Reposition the Author Box on Author Archives
To reposition the author box on author archives, unhook
genesis_before_loop, and then re-hook it on a different hook and/or a different priority.
The code you’ll need to install is below. Just replace
another_hook with your desired hook. You can optionally include a third argument to control the priority.
Force Remove the Author Box from Author Archives
Each author can remove the author box from their own author archive by going into their user profile settings. However, you can force remove the author box from every author’s archive with the below:
genesis_do_author_box_archive has been included since version 1.4.0.
genesis_do_author_box_archive is located in lib/structure/archive.php.