Posted on 9/12/2017 in Web Development
By Matt Wiseley
Most people know WordPress as a blogging platform and often don't think of it when trying to choose a CMS for their business website. While this may have been true in the early-mid 2000s, WordPress can actually be extended to create robust custom websites. In this article, we'll explore how custom post types can be used to elevate your site from a simple blog to a fully functioning CMS.
The myth that WordPress is only for blogs stems from the fact that it formed as a successor to weblog tool b2/Cafelog in 2003. This connotation was further compounded by the fact that WordPress launched with two content types: pages and post.
Figure 1- With only posts and pages, it is difficult to organize and keep several different of entities
In 2005, WordPress created support for static pages which added a field called post_type to the wp_post table. Using the post_type field, developers could now create new entities, or custom post types. Even today a custom post type is just a post with a different post_type value in the database - but full support for custom post types did not become available until 2010 when Version 3.0 ‘Thelonious’ was released. Prior to 2010, developers who wanted custom post types before 2010 to have to use some pretty hacky workarounds.
WordPress started to become a full CMS after version 3.0 because it officially introduced custom post types as well as a lot of built in functions to handle this new feature. This allowed developers to easily create new entities for content creators to use. It also allowed for those custom post types to be assigned its own taxonomy, interaction messages and Meta.
We actually used WordPress to build our own company site and leveraged custom post types quite heavily to build out structured custom content. On our website we have the default post type that we use for our blog and then pages for static assets such as the home page and landing pages. This would be enough if we only wanted to build a blog - but we had a lot of other content that we wanted to include that didn't really fit that mold. For example - at Wakefly, we are proud of our team and work and would like to show them off. We decided that we wanted to be able to show off our employees, portfolio, news and awards.
Figure 2 - On our site we created custom post types for portfolios, employees, awards and news
We could have just made everything into a post and then set a category to each. But this would put all our content into one place and would have made the back-end of the site messy. It would also make adding taxonomy to the posts more difficult and the custom Meta would be applied to everything instead of a custom post type. For example, an employee may need an employee type field, but it doesn’t make sense for a portfolio to have this.
On our site, we gave our employee post type a career taxonomy, where our content creators could easily add or change a job role. We also created a bunch of Meta that our content creators could use to add employee specific data to the post.
Figure 3- Career Taxonomy that allows a content editor to easily edit an employee’s job role
Figure 4- We organized our Meta into tabs and give our content creators easy ways to change an employee’s info
In comparison, we gave our portfolio post type three taxonomies: Industry, Platform and Service
We also have an entirely different set of Meta that allows content creators to add relevant data such as case studies and galleries.
Want to know more?
Contact us to learn more about WordPress and how you can leverage this easy-to-use platform for your business?
Optimize Your Website
In the world of website software and application development, there are many frameworks and languages that developers can choose from. Each framework [...]