Organizing your site with Custom Post Types, Taxonomies, and Fields

Information Architecture - Bulletin board with sticky notes used to plan site organizationCustom Post Types,Taxonomies, and Fields all enhance WordPress information architecture capabilities. Folks continue to be confused on what these things are and when to use them. Let’s present a use case to explain when best to use these powerful tools. This use case explains when to use these powerful tools.

Normal Everyday Blog Posts

When you post to your personal blog about what you’ve been doing today, it’s no big deal.

  1. Come up with a smarmy title
  2. Type out some witty commentary
  3. Add a couple photos
  4. Select a category such as “Home Life,” “Work Life, “ or “Play Life”
  5. Add a few tags detailing the post, such as “coffee,” “pizza,” “volleyball”

This goes on daily, and works great. Each blog post is an item of news about you.

Then You Start Geocaching

Information Architecture - man sorts through found cacheLike you really needed another hobby, right? You start geocaching–searching for hidden treasure called “caches” with your GPS–and posting finds to your personal website. Sure, the geocaching site has a page for every find, where you get to claim your discovery. You want to add your own personal flavor, photos, and such to your own site, as well.

Common attributes for caches

All caches you find share a few common attributes. Each and every cache gets the following assigned to it:

  1. Difficulty: 1 to 10
  2. Size: Micro, Small, Medium, or Large
  3. Terrain challenge: 1 to 10

Uncommon attributes for caches

Your fabulous finds all have 4 other pieces of information you would like to keep track of. This information is almost always unique per cache. For example:

  1. Latitude
  2. Longitude
  3. Altitude
  4. Street address (if in city)
  5. Date and Time of the find
  6. URL of the cache on your geocaching club’s website

Featured Plugin - WordPress Ecommerce Shopping Cart Plugin

Out of all the WordPress ecommerce plugins available, MarketPress has got to be the winner - easy to configure, powerful functionality, multiple gateways and more. A simply brilliant plugin!
Find out more

Time to upgrade your blog’s information architecture

You’re pretty smart, so you first realize you can add a “Difficulty” category to your blog, then add sub-categories for 1 through 10. You can do the same by adding a “Size” category and then adding sub-categories for “Micro,” “Small,” and so on.

Information Architecture - a poorly-planned site's unwieldy category listYou’re also kind of picky, so you soon realize that:

  1. The list of available terms in your category list is going to get unwieldy.
  2. Having subcategories 1-10 under “Difficulty” and also under “Terrain” will result in some unwanted slugs in your permalinks.
  3. All these category terms will show as options everywhere in your blog–even when you’re just making a plain old daily personal update.
  4. There must be a more organized way to do this.

Adding Custom Taxonomies

After poking around, you find plugins and code to add your own custom taxonomies–which are like categories or tags, but with your own name and terms. You add taxonomies for “Difficulty,” “Size,” and “Terrain”–each with appropriate terms, like “Micro” and “Small” for “Size,” and so on.

Now, you can sort and display your posts by any of these criteria–such as viewing all with a size of “Micro.” Fantastic!

Information Architecture - Screen shot of multiple custom taxonomies on an edit page

What’s that doing there?

Remember how picky you are? You make a new personal post about your kitty running away, and see these new taxonomy lists show up on your post editing page. Something seems odd about that. After all–if you’re writing about anything other than a cache find, none of those taxonomies are relevant. Sure, you could just leave them alone, checking nothing. You could hide them using Screen Options. The fact is, they are irrelevant, and don’t belong there.

Something must be done.

Featured Plugin - WordPress Google Maps Plugin

Simply insert google maps into posts, sidebars and pages - show directions, streetview, provide image overlays and do it all from a simple button and comprehensive widget.
Find out more

Adding Custom Post Types

Information Architecture - Custom "Cache" type panel in WordPress dashboardNo problem! The WordPress community is helpful, and you find plugins and code to create what are called Custom Post Types. You’re happy because a custom post type can be just like a regular post, but you can add and remove different features from it as needed.

You create a post type called “Caches.” Then, you edit the custom taxonomies you made earlier, and tell them to only show up for the “Caches” post type.

Awesome. No more extraneous, irrelevant taxonomies littering your normal Post edit screens!

Managing custom fields

You find a great cache in the hills outside of town, and go to post it to your blog right away. You create a new “Cache” entry and start filling in the details. That’s when you realize you forgot to account for the find’s latitude / longitude, altitude, and other data you want to record. You think about just adding this at the end of the post’s content, but then you realize you’d never be able to sort, search, and compile your posts based on any of this data in the future. To do that, you need to capture this data in specific fields–not just lump it in after the content.

Information Architecture - Default, cumbersome custom fields interface for postsDefault custom fields entry

No problem. You start to use the “Custom Fields” in your edit screen to add these data. That’s sort of ugly though, don’t you think?

Surely, there must be a better way.

Information Architecture - Custom fields user interface for post typeSpecialized custom fields entry

Hitting up the WordPress community once again, you find a plugin that helps you create special areas in edit screens for custom fields. You can insert special fields for adding files, inserting dates, choosing from radio buttons, checkboxes, and menus. And the icing on the cake? You can tell your custom post type called “Cache” to include these special fields–and you can leave the fields off of every other post type, where they are irrelevant anyway!

Featured Plugin - WordPress Facebook Plugin

Would you like to add Facebook comments, registration, 'Like' buttons and autoposting to your WP site? Well, The Ultimate Facebook plugin has got that all covered!
Find out more

The world’s greatest website (says your mom)

There you have it–your personal blog evolved from “news about you,” to adding specific data about the special caches from your geocaching adventures. Since you can control what taxonomies and fields show up for each post type, you won’t have to skip past all those Cache-specific fields tonight when you make a normal post about finding your kitty cat!

Simple information architecture choices in summary

Your use cases may differ greatly when considering whether or not to use these custom tools. Wrap your brain around the following 3 guidelines, and you’ll probably come out okay.

  1. When numerous posts can be classified by a meaningful attribute (like Size,) it’s probably worth creating a custom taxonomy for that attribute.
    Taxonomies are like adjectives that can be applied to numerous items on your site.
  2. When posts need assigned data that’s almost always unique amongst other posts (like Address,) it’s probably worth creating a custom field for that data.
    Custom fields are like adjectives that only apply to individual items on your site.
  3. When numerous posts are about a specific thing (like Cache) that always involves the same taxonomies and custom fields it’s probably worth creating a custom post type for that thing.
    Post types are like nouns. The main reason for a new post type is its unique characteristics that can’t be neatly packaged any other way.

Featured Plugin - WordPress Newsletter Plugin

Now there's no need to pay for a third party service to sign up, manage and send beautiful email newsletters to your subscriber base - this plugin has got the lot.
Find out more

Image Credits

Comments (3)

Participate