Create Awesome Archives with Genesis

The Genesis Framework includes some awesome features, that solve some common problems. One really handy feature is customizing your archives. Out of the box, WordPress doesn’t give you a whole lot of options for archives, but Genesis adds the necessary functionality to:

  • Add custom archive headlines
  • Add custom content to archive pages
  • Control the display of archive entries, such as character limits, featured image display, and excerpt vs. full content display.
  • Control the archive layout

What are archives, anyway?

Archives are just a list of your posts, in reverse chronological order (newest first). WordPress generates archives for posts, tags, categories, dates, and authors. Depending on your particular site, you may also have archives for custom post types, and custom taxonomies as well.

By default, archives are a handy way to group related content, but are pretty boring. Adding custom headlines and additional content lets you make your archive pages more meaningful, both to readers and to search engines.

Adding a Custom Headline and Description to Taxonomies

Each taxonomy that supports Genesis Archive Settings can be edited by going to the taxonomy, categories for example, and clicking “edit”.

Genesis Archive Settings

There are a few metaboxes on the taxonomy edit screen that are added by Genesis, namely the Archive Headline, Archive Intro Text, and Layout Settings.

Genesis Archive Settings

Adding a Custom Headline and Description to Post Types

Custom archive settings aren’t limited to taxonomies, they can also be applied to custom post types as well, although they will have to be enabled.

There’s two ways to enable Genesis Archive Settings in your custom post types:

1. In the Post Type Settings.

In your custom post type ‘supports’ argument, you just have to add the ‘genesis-cpt-archives-settings’ argument.

'supports' => array( 'title', 'editor', 'genesis-cpt-archives-settings' ),

2. Using a function

If you’re not the one registering the custom post type, such as those added by other plugins, you can use the add_post_type_support() function to add Genesis Archive Settings support.

<?php
function event_archive_settings() {
	add_post_type_support( 'event', 'genesis-cpt-archives-settings' );
}
add_action( 'init', 'event_archive_settings' );

From there, follow the same process as you did for categories and tags.

Published by

I’m a full stack Web Developer living and working in Madison, WI. I specialize in WordPress development, including plugins, themes, security, performance, and maintenance.

Leave a Reply

Your email address will not be published. Required fields are marked *