Adding Archive Pages to WordPress Menus

It is somewhat difficult to add post type archive pages into WordPress menus. WordPress does not provided these as options by default. There are workarounds, like using a custom link or a plugin, but none work satisfactorily. There are also programmatic approaches, but many include writing custom meta box display code which is … yuck. So what is an elegant way to add archive pages? What does WordPress provide for free?

Here’s the idea: create a custom taxonomy and use it to display archive pages in the menus editor.

Archive Pages menu

To do so, create a new taxonomy for the archive pages:

Then, create the terms for each public post type:

Next, filter the term link output to point to the custom archive page:

Lastly, add the current classes to the menu when viewing that custom post type: