5 Ways to Use WordPress Custom Post Types

Customizing WP

WordPress has been around since 2003, and for several years was mostly used to run blogs or personal websites.

Until a few years ago a majority of the websites powered with WordPress were still blogs or small sites, and it may also be true today.

However, ever since the ability for developers to create custom post types was introduced in 2010 with version 3.0, WordPress has been used to power many more types of websites.

We’re going to show you 5 ways in which you can use WordPress custom post types.

What are Custom Post types?

By default, WordPress provides four post types: “Post”, “Pages”, “Attachment”, & “Revision”.

Internally, all of these post types are stored in the same database table, although they are differentiated by a column called post_type.

Custom post types allow us to break out beyond “Post”, “Pages”, “Attachment”, & “Revision”.

Custom post types were added in version 3.0. Before that there was no easy way for developers to create a custom post type.

Now you can create any kind of post type using either free plugins such as Custom Post Type UI or by simply adding a few lines of code to your themes functions.php file.

#1. Portfolio

cpt-portfolio.png

Portfolio is perhaps the most widely used example of custom post type. Premium theme developers had a major influence on this. As designers and developers are the first to adopt new technologies its no surprising that they started using custom post type to display their work.

#2. E-commerce

cpt-products.png

Among many available open source CMS’s, WordPress is considered the simplest. And being the favorite app of many developers it was only time that someone figured out a way to use it for e-commerce websites.

A custom post type for e-commerce would be Products. You can use this along with categories or custom taxonomies to arrange products in different categories.

With WordPress E-commerce plugins such as WooCommerce gaining popularity and having reached the milestone of a million downloads, products would have to be the 2nd most used post type.

#3. Question & Answer Website

cpt-qa.png

By default, WordPress offers commenting & user management systems.

You can combine these with custom post types to create sites like Stackoverflow.com. A question can be treated as a custom post type and answers as comments.

#4. Real Estate Listings

cpt-property.png

A typical real estate listing consists of property details along with other details such as location, agent, etc. This can be accomplished using a custom post type for property listing.

Combined with custom meta boxes this can be used to create complex real estate listing with details such as size, location on map, property types, etc.

#5. Directories

cpt-listing.png

Most directories on the web have a similar structure of categories and listings, which also is what WordPress offers. Whether it’s a directory of local restaurants or a job listing portal, custom post types can be used to create listings and comments can be used to allow users to leave reviews.

Author

  • Steve Burge

    Steve is the founder of OSTraining. Originally from the UK, he now lives in Sarasota in the USA. Steve's work straddles the line between teaching and web development.

0 0 votes
Article Rating
Subscribe
Notify of
6 Comments
Oldest
Newest
Inline Feedbacks
View all comments
GLC900
10 years ago

I’ve seen these used to control how a contributor can create a post without screwing up the styling. For example they enter a title into a title field, but they can’t change the look of the title, so that a title is always being styled from the CSS, and not locally.

Is there anything similar for Joomla?

Jeanne Biggerstaff
Jeanne Biggerstaff
10 years ago

Could Pods be used to create a Membership Directory with member photos and contact info and then be set for use with a password only?

steve
steve
10 years ago

Hi Jeanne. Yes, definitely. We’re actually planning some follow tutorials on Pods. That might make a nice example.

Aksam Zarook
Aksam Zarook
10 years ago

Thanks for this list about what you can do with custom post types. Can you post about how to make a plugin for a listing type of website using custom post types?
Building a real estate plugin from scratch seems to be the easiest root since real estate agents needs and field requirements are different from country to country.

I’m currently trying to make a real estate listing website using wordpress for one of my web design clients. But i’m struggling with making it. I checked out several real estate plugins and themes and all need to be customized heavily if I’m going to use it in this current project. Thanks

wpdeveloper
wpdeveloper
3 years ago

Wonderful article. Thank you very much. This is very helpful!

6
0
Would love your thoughts, please comment.x
()
x