fbpx

Organizing Custom Post Types

Custom post types are the backbone for organizing information on WordPress. They allow us to separate data on both the front and back end for easy access and updating. However, most WordPress users only scrape the surface this truly awesome feature. I’ll dig into the potential for both Custom Post Types (CPTs) and custom taxonomies (e.g. categories).

Working Wonders

My 2nd project at CYBERsprout was focussed a lot on organizing content. The Explore Alexandria Tourism website had over 200 pages that were tough to navigate and maintain. After I created a CPT for Lodging and Attractions, the number of pages dropped to less than 20! There was so much duplicate content!

It was a pain to keep things up to date. Just to change the contact info for a hotel, 6 different pages had to be updated. The sustainability was burdensome. Even worse, search engines had a hard timing understanding the site.

By switching to a much cleaner information architecture, search engines could understand the site much better. This fairly basic set up grew search traffic to the site by 57% over the course of the following year!

Basics Of Custom Types

It is important to know how to set up a custom post type. It is pretty simple with Toolset or Pods. For the most basic set up, you only need to set the name of the post type and set a slug. There is the ability to add an excerpt, author, comments, or a featured image if desired.

Custom post type options

The beauty of even this most basic CPT is flexibility. You can display static content, like Hotels, without a published date in the meta data and add a unique category to help group entries. Or you could have Board Minutes in their own CPT to keep in completely separated from the regular blog posts.

After setting up the CPT, you can rely on two ways of displaying the information. You can easily share a link to the CPT permalink (i.e. set by the slug). That method will display the entries using the builtin WordPress archive loop. The other option is to display the entries using a custom view loop. You can do this with custom code, Toolset Views, a page builder (e.g. Beaver Builder), or many other options.

Creative Ways Of Organizing Custom Post Types

Now that we’ve briefly touched on the basics, let’s start to explore some new ideas for organizing custom post types!

Default Taxonomies

Before jumping into custom taxonomies, we should talk about the taxonomies built into WordPress. In case you’re wondering, a taxonomy is essentially a way of grouping entries together. Categories and tags are the default taxonomies for blog posts in WordPress. They are great for organizing posts into group. The default categories and tag could also be a way to tie blog posts to a custom post type.

Imagine you have a store set up and you want to display the products on the sidebar for blog posts. It would be very beneficial to make sure those products relate to that post’s content. By adding the same blog post category taxonomy to the products post type, you can create a common link. The related products can then be shown on the sidebar using a plugin like Toolset Views.

Custom Taxonomy

Sometimes the default taxonomies don’t make sense for our post type. A simple example could be House Styles for a Properties post type. This would allow properties to be organized by styles like Victorian, ranch, colonial, etc. This set up is pretty straightforward. One custom taxonomy for one custom post type.

Many users don’t consider using a custom taxonomy for multiple post types. Say we wanted to link real estate guides to our blog posts based on neighborhoods. A custom Neighborhoods taxonomy assigned to both blog Posts and a custom post type, Guides, will work great here. This new taxonomy will keep the blog post categories from becoming too cluttered and it will still allow for the two post types to be easily linked.

Another possibility is to assign multiple custom taxonomies to one post type. For example, a Properties post type could have the taxonomies Neighborhoods, Rooms, Agents, Features, and Price Range. There’s no limit! It can also make it easy for the visitor to filter by the attributes most important to their property search.

One last approach is to use a custom post type as the taxonomy. It is a bit unique as custom post types weren’t created for this purpose. However, the plugin CPT-onomies makes it easy to set up. This would be great if you wanted to better highlight the neighborhoods from last example but also wanted to use them to group up properties. There are limitations to this approach. For example, other plugins often won’t recognize these post type entires as taxonomy terms.

Creating a custom content WordPress Archive is an alternative approach. They will be recognized by other plugins but don’t loop in terms quite as nicely as post entries.

Parent And Child Post Types

We’ve talked a lot about creating connections between post types. I’d be remiss if I didn’t discuss parent and child post types in this topic. The parent-child relationship can be fantastic for creating one-to-one relationships between content. Let’s dive into an example to learn more.

We’re going to add some depth to our Properties CPT by creating an entry for each room in a house. We’ll first need to create an additional CPT called Rooms. This CPT will be set up like any other except we need to select Properties as the parent post type.

Parent-child for custom post types

Now that we’ve created this relationship, we can add rooms for every property. It’ll look something like the image below.

Adding child posts in WordPress

The child posts won’t display automatically on the frontend. You’ll need a custom content template or the child pages plugin.

Benefits

There are many advantages to using and organizing custom post types. My favorite benefit is the clean-cut information architecture. It is wonderful for keeping everything sorted and search engines love it even more!

There are some other odds and ends you can utilize with CPTs, too. It is an easy way to separate user-generated content. It is typically best to keep this content separate from your brand’s posts. Another could be restricted content. Membership sites thrive on keeping enticing content behind a curtain. A CPT makes it easier to set which content should be restricted.

I also love how Google Analytics plays nicely with CPTs. For those of you that like to segment data, a filter based on the post type name will help a lot.

There are so many benefits! The only thing to keep in mind is that planning is key. It is very difficult to organize custom post types well without a good plan!

Tyler Golberg

I love writing about web design that inspires, figuring out Google's black box, and speaking to lively audiences. In my spare time, I enjoy reading Game of Thrones (waiting on Winds of Winter) and touring the lakes on my paddleboard.

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.