What started as a relatively simple blogging platform has become the content management system that powers 20% of the web. That’s right, one out of five websites on the internet are built with WordPress. That’s over 60 million sites, some percentage of which don’t even have a blog at all. The secret to the rapid growth of WordPress as a viable CMS is the ability to customize three basic building blocks: post types, taxonomies, and meta fields. These three tools have allowed for the transformation from blogging to complex, data driven websites (and applications).
Definitions & Examples
What exactly are these things?
Custom Post Types are content objects created for a specific purpose or use within a site. WordPress already has a few defined post types you might recognize, namely “posts” (entries on a blog) and “page” (pages of a website). Creating a custom post type adds a new content structure to the site that, by default, operates just like the native blog and posts. For example, if you wanted to create a movie rating website, you could define a “movies” post type. By basing it off the structure of a “blog post,” a majority of the work is already done.
But say you want to classify and sort said movies by genre or year. That’s where Custom Taxonomies come in. Just like the default categories and tags of the WordPress blog, taxonomies make it possible to structure large amounts of content in a logical, well-organized way.
And lastly, if you wanted to add details or other information to each post (movie), but you didn’t want to create a new category structure (taxonomy), you can add custom meta fields. These are similar to taxonomies in that a new box will be added to the post in WordPress, but different because it is simply adding the data. No structure or url created. In our movie example, say we want to add the MPAA Rating, a review out of 10, and the run time. We can put these all in a meta box called “Movie Details.”
By creating a custom post type (movie), taxonomies (genre, year), and meta fields (rating, review, runtime), we have transformed a simple blog post editor into our personal movie database:
And these techniques are certainly not limited to movies. Maybe you want to create a catalog of beer, a list of houses you’ve built for other people, or a portfolio of your work. The flexibility of these three tools gives you the opportunity to create your own content platform right over top of WordPress’ easy and user friendly interface. This is the real power of WordPress.
(Stay tuned for the next part in this blog series to learn the quick and easy way to build and define these custom structures, and the best way to display and utilize them within your theme.)