Genesis themes include a number of Page templates, which can be used to automatically create special pages on your website that would be more difficult to create manually. One of these is an Archive Page template that adds the following in place of the usual content:
- a list of all Pages
- a list of all categories
- a list of all authors
- a list of monthly Post archives
- the 100 most recent Posts
The function responsible for outputting the content of the Archive Page template is
This function produces a sitemap using the
genesis_sitemap function. It checks whether the child theme supports the semantic headings accessibility feature and marks up the sitemap with H2 headings if so or H4 headings if not.
By default, this function is hooked to
genesis_entry_content (HTML5) or
genesis_post_content (XHTML) at the default priority 10 in place of the
genesis_do_post_content function, but only for Pages using the Archive Page template.
Produce the Archive Content Elsewhere
It is not possible to produce the Archive Page content elsewhere on your website, because the function is only loaded when the Archive Page template is in use.
Rewrite the Archive Page Content
The basic code to rewrite the Archive Page content is below, for HTML5 and XHTML respectively. Save the entire code as a new child theme template called page_archive.php. Just replace
your_function_here with the name of your function.
Remove the Archive Page Content
To remove the default Archive Page content, you have to create a template in your child theme called page_archive.php, without the call to the
Example 1: replace the primary sidebar, instead of the body text, with the archive content. Save the entire code as a new child theme template called page_archive.php.
Genesis Simple Hooks
This function is not unhookable via Genesis Simple Hooks.
There are no filters on the output of this function.