• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

nSiteful Web Builders

Building a Better Web - One Site at a Time.

  • Home
  • About
    • Testimonials
    • Resources
    • Partner With Me
    • Frequently Asked Questions
  • Web Sites
  • Online Marketing
  • WordPress Support
    • Customized WordPress Training
    • 60-for-60 Sessions
  • Web Applications
  • Blog
    • At-A-Glance
    • Blog Articles Grouped by Category
    • Case Studies
    • General
    • Portfolio
    • Reviews
    • Snippets
    • Techniques
    • Projects
  • Contact
    • Purchase Retainer Consulting Hours
    • About Retainer Consulting Hours
    • Book a Meeting with Jeff
    • Tell Me About Your Web Project
    • nSiteful Newsletter Archives
    • nSiteful Rewards

By Jeff - 10/10/2018
Cats: Techniques · Tags: Advanced Custom Fields, Custom Fields, Custom Post Types, WordPress

techniques

Dive Into WordPress Custom Post Types – Part 1

Last updated November 6th, 2023 at 08:12 pm

dive into preamble

This is one of a series of articles about the why/when/how of WordPress Custom Post Types (CPTs). The articles are geared to WordPress developers who may have little or no experience with custom post types, with the hope that what I share will remove some of the mystery associated with CPTs and encourage some of you to dive right in.

toc for dive into cpt

Posts in this Series

  1. Dive Into WordPress Custom Post Types – Part 1
  2. Dive Into WordPress Custom Post Types – Part 2
  3. Dive Into WordPress Custom Post Types – Part 3

WordPress introduced Custom Post Types on June 17, 2010, with the release of version 3.0. Custom Fields (in the form of meta_data) were part of WordPress since (I think) forever; developer tools for dramatically extending their functionality were added in March of 2008, with version 2.5.

I’ll admit I didn’t dive in right away myself.

What are Custom Post Types and Custom Fields — and Why/When Should You Use Them?

First: A little background on Post Types

I think it’s unfortunate that WordPress uses the term “Post” in both the generic and specific sense. So, a Post is a Post and a Page is a Post. That’s potentially confusing. Similarly, it might have been best if WordPress used Custom Content Type rather than Custom Post Type. But whatever.

Everyone who works with WordPress knows about the two main post types that have been part of WordPress since the beginning: Post and Page. The anatomy of these two post types — and the editor interfaces we use for both — are very similar, with only minor differences.

(Blog) Posts

The Post post type is typically used for blog posts, and these are normally (by default) displayed in a blog in reverse date order. Posts can be assigned Categories (and subcategories) and Tags, for the purpose of grouping similar topics together. Each can be assigned a manual excerpt (a misnomer, because it’s actually a summary or synopsis), and each can be assigned an unlimited number of sets of meta data (custom fields), although very few people use this function.

The article you’re currently reading is a Post.

Pages

The Page post type is typically used for the static pages of a Web site. Pages can have child pages (subpages), and they typically (by default) are not assigned Categories or Tags. The publication dates of Pages play no role in how they are displayed on the Web site’s front end — except for the fact that a post-dated page will not show up on the site until the publication date. Like Blog Posts, Pages can be assigned sets of meta data (custom fields), and like Blog Posts, very few people use this function. By default, Pages don’t support manual excerpts (synopses).

Custom Post Types (Finally!)

My rule of thumb:
My rule of thumb is that a Custom Post Type — combined with custom templates, custom fields (usually), and custom taxonomies (often) — is great solution for any type of content that (a) has a unique set of properties/attributes and (b) you need to display in a consistent, uniform manner, both in the listing of all items (the archive page) and in the individual page that displays the single item’s details.
Examples of Candidates for Custom Post Types

Here are just a few examples of content items that could be handled by the custom post type (and custom fields):

  • Books you’ve authored (or read)
  • Staff directory
  • Testimonials
  • Favorite movies
  • Recipes
  • Frequently Asked Questions
  • Board of Directors

A book has a number of significant properties/attributes that you’d probably want to display on your site:

  1. author(s)
  2. publisher
  3. publication date
  4. genre
  5. number of pages
  6. synopsis
  7. cover picture
  8. etc.

For each staff member in a staff directory, you might want to display a number of properties other than name:

  1. job title
  2. department
  3. telephone
  4. email
  5. school(s) attended
  6. favorite quotation
  7. etc.

Every testimonial might have, in addition to the testimonial text, these properties:

  1. author name
  2. author email
  3. author company
  4. author company website
  5. author industry
  6. author job title
  7. etc.

And so on.

Why not just use Posts or Pages?

You could use standard posts or pages to present custom content. However, you’re asking for a whole lot of pain if you ask me. The workflow would be horrendous, and the chances of achieving consistency and uniformity in displaying your content are quite low.

Theoretically, you could publish information about all your custom content (let’s use Books) as either posts or pages. But the default editor interfaces for posts and pages are not especially well suited for the particular properties/attributes of these content types.

What if we used the “Post” post type?

Let’s consider the workflow and potential pitfalls.

You could publish the details of each book as a post and assign it category of “book”. You could use tags for genre (Romance Novel; Cookbook; Self-Improvement; etc.). In the editor box, you would presumably enter the information with a standardized structure and format:

The book title would be the post title, so that’s taken care of. Then you might enter all the other book details, each on its own line, each potentially formatted in some special way. You might have the author’s name in bold; italicize the publication date; set off the synopsis in a box in a smaller font size and different font color; display a thumbnail of the book cover as a right-floated image; and so on.

Go ahead and Publish.

Now add another post for the details of another book. Assign it the appropriate category and tag(s). For the sake of uniformity of appearance, enter the details for this book in the same sequence and with the same formatting you used for Book #1. Publish.

One good thing about using the “Post” post type for your books is that WordPress will automatically display a listing (“archive”) of all book posts on the website page with this URL:

https://{your-site-domain}/category/book/

Do you see the potential problems?

For one thing, this sounds like a lot of work and a lot of remembering (especially the sequencing and formatting of details).

Secondly, since the detailed info for each book will be a blog post, they will — by default — be displayed on your blog in reverse chronological order: not necessarily ideal.

A huge problem with this approach is how difficult it will be to maintain and update the site when styling preferences change.

If you’re hard-coding the styling of details (rather than wrapping each detail in a CSS class), you’re in for a whole lot of pain when (not if) you decide later on you want some detail element to be displayed differently. Just imagine that you or the client decides that the color of the book’s synopsis should be a light shade of gray instead of black. You’d have to manually edit every instance of the book synopsis in every post in order to make the change and make it consistent.

Would it be better to use the “Page” post type?

If you’ve decided to use the page post type for the books and the master book listing, you’d avoid the reverse date-order sequencing problem, but you’d be preserving others and introducing a couple new ones, most significantly:

  • Pages do not — by default — support categories or tags.
  • Pages do not automatically generate archive listings, so you’d have to create (and maintain) one yourself.

In other words, you’d have to (1) create a master “Books” page that will serve as the listing of all books with links to the pages that contain their details. Presumably, that master “Books” page would list some of the information related to each Book, along with links to the dedicated pages for each book. And then, every time you add a new book page, (2) you’ll have to update the master “Books” page accordingly.

What about the custom fields meta boxes?

Screen capture of custom fields meta boxes
Click to see meta boxes enlarged

At this point, some of you are thinking, “Couldn’t I use the Custom Fields box to enter meta data about each book? Couldn’t I enter all the details there?”

The short answer is yes. The longer answer is that the Custom Fields box in the page/post editor interface is kludgy and not very intuitive. Plus, this approach will require you to either edit or create template files. Trust me… there’s a better way:

Create a custom post type (and custom fields) for each of those content types and properties.

Wait… Isn’t there a plugin for that?

screenshot of WordPress plugins repository“But wait a minute!” you’re thinking. “Aren’t there plugins for all of these content types?”

Indeed there are. Because many of the plugins you use on your Web site(s) have, as their foundations, custom post types and custom fields.

If there’s a plugin that handles your custom content, by all means use it. However, especially in cases where a plugin might be overkill, consider the DIY approach: create your own Custom Post Type and Custom Fields.

Why is the Custom Post Type/Custom Field Approach Better?

  • Superior Workflow
    The add-edit interface for custom post types is an extremely efficient method for entering your content — no need to remember which element goes where. You fill in boxes.
  • Uniformity & Consistency
    With custom post types, presentation and content are completely separate, ensuring that your content will be displayed in a consistent, uniform manner everywhere on your site.
  • Display Anywhere
    Through the use of custom shortcodes, there will be no limit on how or where you can display your content.
  • You’ll Never Go Back
    Once you get the hang of things, you’ll feel like a WordPress guru. Because you will be.

I can almost guarantee that once you dive into custom post types and custom fields, you’ll start seeing opportunities for using them everywhere.

But the Intimidation Factor…

Custom post types and custom fields can be intimidating because the code needed to create them looks complicated. In part 2 of this series, I’ll address the issue.

Join The Discussion

Please post your questions and comments in the comments section below. In particular, if you have some content type you think might be a good candidate for custom post types and custom fields, share your thoughts. I might use your use case in a future blog post — or even a tutorial!

Summary

While Custom Post Types and Custom Fields are separate and — theoretically — independent entities, I think it’s most helpful to think of them together. Like I said, you could add custom fields to blog posts and pages using the custom fields section of the editor, but that approach is far from ideal. And as for creating a custom post type without adding custom fields — well, I don’t even see the point.

Like what you see? Share with others and join my mailing list. No long-term commitment, unsubscribe any time.

Related Posts

  1. Dive Into WordPress Custom Post Types – Part 3
  2. Dive Into WordPress Custom Post Types – Part 2
  3. Use Case for Custom Post Type: “In The News”
  4. Making Sense of WordPress Post Formats
  5. Customize User Roles & Capabilities in WordPress: How (and Why)

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

mailchimp signup

Subscribe to get notified when new articles are published. Unsubscribe any time. No spam. I promise. Check out my newsletter archives.

social

Twitter Facebook LinkedIn

Recent Articles

  • Post-Specific CSS for WordPress October 5, 2026
  • You built an online course, but they haven’t come. September 16, 2026
  • Custom MemberPress Pricing Pages December 19, 2025
  • CSS Data Attribute Override December 11, 2025
  • MemberPress Rules Using Custom Taxonomies and Custom Roles December 10, 2025

Filter By Category/Tag

Categories

  • Case Studies (8)
  • For Staff (1)
  • General (73)
  • Portfolio (7)
  • Reviews (14)
  • Snippets (24)
  • Techniques (52)

Popular Tags

Advanced Custom Fields Blogging Child Themes Content Marketing CSS Customer Service Custom Fields Custom Post Types Diagnostics Domain Names Facebook FooGallery Genesis Hosting HTML Images iPhone Libra Live Chat Marketing Media MemberPress MemberPress Courses Membership Sites Mobile-Friendly MySQL Photo Gallery php Pinterest Plugins Post Formats Pricing Project Management SEBA SEO Seth Godin Shortcodes Social Networking Surveys Taxonomies Twitter Video Web design Web forms WordPress

Footer

Background

Web Sites | WordPress Support | Web Applications.

Formally trained in liberal arts and education (I have a B.A. in Government from Harvard and studied Secondary Education at Rutgers Graduate School), I have honed my skills in the communication arts and sciences as a teacher, trainer, instructional designer, writer, photographer, calligrapher, helpdesk manager, database programmer, and multimedia developer.

(I've also been a group counselor, waiter, bartender, bicycle messenger boy, computer salesman, carpenter's helper, financial analyst, and school board president.)

Tech

Systems since 1983.
Web sites since 1994.
PHP since 2001.
WordPress since 2007.

Contact

Book Meeting
770-772-5134
Email Jeff
Send Money
All Ways

Copyright 2026, nSiteful Web Builders, Inc.

Cookies Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}
https://iframe.mediadelivery.net/embed/392008/42d18bc1-2adc-4741-b733-053d08d09c32
https://vz-000c5976-3ab.b-cdn.net/42d18bc1-2adc-4741-b733-053d08d09c32/play_720p.mp4

Receive occasional emails from Jeff