Custom Post Types are arguably the feature that brought WordPress from being a standard blogging application up to a CMS. I’d even go as far to say that this feature also added new APIs for developers to use when building web applications.

Here’s a post, but this isn’t exactly representative of a custom post type.
Though posts, pages, and basically anything that as a title and the editor (among other optional features) are post types, custom post types are what allow us to actually create a model of information to store in the database, associated with metadata, and more.
The point of this post isn’t about how great custom post types are, though. Instead. it’s about how to handle the case whenever you receive the following message:
Fatal error: Call to a member function add_rewrite_tag() on a non-object
Fatal error? That’s never good. The nice thing is that this isn’t really terribly difficult to fix.



