Understanding Custom Post Types and Taxonomies in WordPress

It’s important to understand what custom post types and taxonomies are. Out of the box, WordPress has several different posts types already to find. And the most common ones, the one you interact on a daily basis are posts and pages. So let’s take a look at what custom posts and pages are because this will be instructive when you create your own custom post types.

Custom Post Types and Taxonomies

Custom Post Types and Taxonomies

Default post types

Posts are what you normally create on WordPress. They are organized in a reverse chronological order so that the last post goes first in the index and you see the rest of the posts below. Posts are non-hierarchial instead, they are organized based on the author who creates them, the date they were published and also using categories and tags. Every post must have a category and all posts can have tags.

Pages

In contrast, pages have single individual items that can be displayed in a parent-child relationship and you usually see this on the main menu. Pages don’t have indexed categories and tags, so the only way to get to them is the direct link which is why they usually appear in the main menus. Post are normally used for any kind of recently updated item like a news article whereas pages are used for static content that is rarely updated and is usually made to be available to inform the visitor about what is going on the site.

Custom Post Types

When you create a custom post type, you can create a post type that acts either like a post or like a page. Whatever one you choose, the new custom post type the inherit all the features of either posts or pages. If you set the custom post type to act like a post, it can be organized by categories, tags or custom taxonomies or a combination of all of these.

Custom post types have separate index pages and you can have custom index templates. You can even call in a custom post type from anywhere within your site using a custom loop.

Custom taxonomies

Taxonomy is a scheme of classification, an organizational system that allows you to relate one item to other similar items in a hierarchical or non-hierarchial group. In WordPress you have two types of taxonomies that you use all the time which are:

Categories

Categories are mandatory. Every post must have a category. They are displayed in a hierarchical system so you can have a parent-child relationship between. These are the main organizational method within WordPress.

Tags

Tags are optional. You can use them whenever you want. They are non-hierarchial which means they are not related to any other tags in any way. These are the secondary organizational method on WordPress.

Why should you use custom taxonomies?

When you create custom taxonomies, you can create either hierarchical taxonomies like categories or non-hierarchial taxonomies like tags. These taxonomies can be applied to one or several post types including posts. Custom taxonomies can have a custom index and archive templates, so you can display them differently from how you would display the category and tag  indexes. The good thing about custom taxonomies is, they allow for more advanced organization of your content.

Christine

Christine

Author at onlineshouter
Christine writes for people who seek for knowledge about SEO, blogging, online marketing, gadgets and web apps.
Christine

Leave a Reply

Your email address will not be published.