Template For Multiple Custom Taxonomy Type Loops

This template displays the custom taxonomy type name then lists all entries for each taxonomy you add to your custom post type like this:

Update : Here’s a newer solution which enables you to use any taxonomy type and display each post in any type of grid layout using even or uneven widths & heights.

taxonomy-entries

Themes like Executive Pro by StudioPress already include the PHP code which creates a custom post type named portfolio as well as the code which adds support for creating custom taxonomy types. If you’re using a new version of the theme, you can install a plugin which adds the CPT & Taxonomy functionality you need to use with this template.

Here’s what i’m referring to:

taxonomy-types

In this example, you’ll find 3 custom taxonomy types added using the settings in the above screenshot named dwell, interiors and commerce. These custom taxonomies are like categories for posts however we call them taxonomy types for the portfolio custom post type instead.

The code in the template dynamically adds a new entry title when you create a new taxonomy type and then lists all the portfolio entries you add to your custom post type. Each single entry for your CPT is listed under its respective taxonomy type title automatically as seen in the screenshot at the beginning of this tutorial.

Template Installation

  1. After logging in and downloading the template file, upload it to your child themes root directory.
  2. You can then select it from the Page Attributes box located in any Edit Page screen.
  3. Optional: Add CSS to display your entries in columns

There’s also CSS included which enables you to display entries for each taxonomy type in a portfolio style grid, similar to how the portfolio archive pages are styled in the Executive Pro child theme by StudioPress.

This tutorial is based on this question by a member of the Genesis community:

Multiple Loops on Custom Post Type Archive Page

I have an archive page for a custom post type called “Work” where individual project information is saved. That CPT has a custom taxonomy (“Type”) and each project is assigned to one of those Types. I have three loops on the page, one for each project type (Dwell, Commerce and Interiors). The first grouping is correct. The second grouping duplicates each project twice. The third grouping duplicates each project three times.

The code in this template creates unlimited loops for unlimited custom taxonomy types with unlimited number of CPT entries using 1 instance of WP_Query.

You can also use this code to display dynamically updated unlimited loops with posts in Genesis or any other WordPress theme for standard categories, tags and other taxonomy types.

Here’s the Template for logged in members:

Related Templates

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.