Link categories to a specific page

By default, categories point to a generic archive page listing everything in that category, like this: http://www.ktoo.org/category/alaskas-energy-desk/. Sometimes you want it to link to a custom page, like http://www.ktoo.org/alaskasenergydesk/.

These instructions will show you how to use a different “home” page for a category, instead of just the first page of the archive. This might be useful for an initiative like the Energy Desk, or for something like a series or podcast.

A couple of examples of where this will be used:

The primary category display on the home page:

The category links at the top of a post:


Important: make sure that the new home page provides a direct link to the category archive (a link that starts out with ktoo.org/category/). Otherwise, visitors will not be able to browse the archives for that category.


Under “Posts”, go to “Categories”


Click on the name of the category to which you want to assign a new home page.


Scroll down and enter your link in the field called “Series Home Page”


Update the category, and make sure you check that category links are going to the right page.

 

 


Technical notes: This functionality is implemented in two places.

  1. The Advanced Custom Fields plugin adds the “series_home_url” field to each category.
  2. The KTOO theme uses the “term_link” filter to check if there is a series_home_url set and substitute it for the default (implemented in functions.php)