Skip to content
WilliamAlexander.co
  • Studio
  • Work
  • Services
  • Process
  • Writing
  • Lab
  • About
  • Start a project
  1. Home
  2. Articles
  3. WordPress Custom Post Types and Taxonomies
WordPress Enterprise

WordPress Custom Post Types and Taxonomies

Organizing content beyond posts and pages

October 10, 2026 10 min read

Key Takeaways

  • Custom post types organize distinct content types beyond posts/pages
  • Taxonomies classify and group content within post types
  • Plan your content architecture before implementation
  • Use plugins for simple cases, code for complex requirements
  • Consider URL structure and SEO implications
Overview

Beyond Posts and Pages

WordPress comes with two content types: posts (for blog-style content) and pages (for static content). But what about events? Team members? Products? Case studies? Locations? Forcing these into posts or pages creates organizational chaos.

Custom post types let you create distinct content types with their own admin sections, URL structures, and features. Custom taxonomies let you classify this content. Together, they transform WordPress from a blog platform into a flexible content management system.

Content Architecture

Custom post types are an architectural decision. Before creating them, think through your content model. What content types exist? How do they relate? How will editors manage them? Good architecture makes sites maintainable; poor architecture creates long-term problems.

When

When to Use Custom Post Types

Good Candidates for Custom Post Types

  • Distinct content types: Events, products, team members, testimonials
  • Different data structures: Content needing unique fields
  • Separate management: Content managed by different teams
  • Unique display needs: Content requiring special templates
  • Independent archives: Content with its own listing pages

When Regular Posts Work

  • Blog articles and news
  • Content that fits the standard post model
  • Content where categories provide sufficient organization
Content Type Recommendation Why
Blog posts Use posts Standard post functionality fits
Team members Custom post type Different fields, separate management
Events Custom post type Date-based display, unique templates
Case studies Custom post type Portfolio-style, distinct structure
News articles Use posts Standard chronological content
Locations Custom post type Unique fields, map integration
Creation

Creating Custom Post Types

Using Code

functions.php php
function register_team_post_type() {
    $labels = array(
        'name'               => 'Team Members',
        'singular_name'      => 'Team Member',
        'add_new_item'       => 'Add New Team Member',
        'edit_item'          => 'Edit Team Member',
        'all_items'          => 'All Team Members',
        'search_items'       => 'Search Team Members',
    );

    $args = array(
        'labels'             => $labels,
        'public'             => true,
        'has_archive'        => true,
        'rewrite'            => array( 'slug' => 'team' ),
        'supports'           => array( 'title', 'editor', 'thumbnail' ),
        'menu_icon'          => 'dashicons-groups',
        'show_in_rest'       => true, // Enables block editor
    );

    register_post_type( 'team_member', $args );
}
add_action( 'init', 'register_team_post_type' );

Key Arguments

  • public: Show in admin and frontend
  • has_archive: Create archive page for this type
  • rewrite: URL structure (slug)
  • supports: Features enabled (title, editor, thumbnail, etc.)
  • show_in_rest: Enable block editor support
  • menu_icon: Admin menu icon

Using Plugins

Plugins like Custom Post Type UI provide visual interfaces for creating post types without code. Good for simple cases, but code provides more flexibility.

Flush Permalinks

After registering new post types or changing rewrite rules, visit Settings → Permalinks and click Save. This flushes rewrite rules. Without this step, new URLs won't work.
Taxonomies

Custom Taxonomies

Taxonomies organize and classify content. Categories and tags are built-in taxonomies for posts. Custom taxonomies extend this to any post type.

Hierarchical vs. Non-Hierarchical

  • Hierarchical (like categories): Parent-child relationships, checkboxes in admin
  • Non-hierarchical (like tags): Flat list, free-form entry

Creating Custom Taxonomy

functions.php php
function register_department_taxonomy() {
    $labels = array(
        'name'              => 'Departments',
        'singular_name'     => 'Department',
        'search_items'      => 'Search Departments',
        'all_items'         => 'All Departments',
        'parent_item'       => 'Parent Department',
        'add_new_item'      => 'Add New Department',
    );

    $args = array(
        'hierarchical'      => true,  // Like categories
        'labels'            => $labels,
        'show_ui'           => true,
        'show_admin_column' => true,
        'rewrite'           => array( 'slug' => 'department' ),
        'show_in_rest'      => true,
    );

    register_taxonomy( 'department', array( 'team_member' ), $args );
}
add_action( 'init', 'register_department_taxonomy' );

Taxonomy Design

Think carefully about taxonomy structure. Too many taxonomies confuse editors. Too few limit organization. Hierarchical taxonomies work for clear categories; flat taxonomies work for flexible tagging.

Shared Taxonomies

Taxonomies can be shared across post types. A "Location" taxonomy might apply to both events and team members, creating connections between content types.

Fields

Custom Fields

Custom post types often need custom fields—event dates, team member titles, product prices.

Options for Custom Fields

  • Advanced Custom Fields (ACF): Most popular, extensive field types
  • Meta Box: Similar to ACF, developer-friendly
  • Custom Metaboxes (CMB2): Code-based approach
  • Native custom fields: Basic but limited UI

Field Design Considerations

  • Keep the editor interface simple
  • Group related fields logically
  • Use appropriate field types (don't put dates in text fields)
  • Consider which fields are required vs. optional
Templates

Templates and Display

Template Hierarchy

WordPress looks for templates in order:

  • single-{post_type}.php for single items
  • archive-{post_type}.php for archives
  • taxonomy-{taxonomy}.php for taxonomy archives

Querying Custom Post Types

$team_query = new WP_Query( array(
    'post_type'      => 'team_member',
    'posts_per_page' => 12,
    'orderby'        => 'title',
    'order'          => 'ASC',
    'tax_query'      => array(
        array(
            'taxonomy' => 'department',
            'field'    => 'slug',
            'terms'    => 'engineering',
        ),
    ),
) );
Conclusion

Structure for Success

Custom post types and taxonomies are powerful tools for organizing complex content. Used well, they create intuitive editorial experiences and clean, manageable code. Plan your content architecture thoughtfully, implement carefully, and your WordPress site can handle sophisticated content structures.

Start with clear requirements: What content types exist? How should they be organized? What fields do they need? Then build the architecture that serves those needs cleanly.

Frequently Asked Questions

Should I use a plugin or code custom post types myself?

For simple use cases, plugins like Custom Post Type UI work well. For complex requirements or performance-critical sites, coding provides more control. If you need custom functionality beyond basic registration, code is usually better.

What's the difference between categories and taxonomies?

Categories are a built-in taxonomy for posts. Taxonomies are the general concept—ways to group and classify content. You can create custom taxonomies for any post type, functioning like categories or tags for your custom content.

Can I convert existing posts to a custom post type?

Yes, but carefully. You can change post_type in the database, but you may lose category/tag associations if the new post type doesn't support them. Test thoroughly on staging. Plugins like Post Type Switcher can help.

Do custom post types affect performance?

Not inherently. Well-designed custom post types with appropriate indexing perform fine. Problems arise from overly complex queries, excessive meta data, or poor taxonomy design. Structure matters more than the existence of custom types.
WordPress Development Content Management Technical Architecture
William Alexander

William Alexander

Senior Web Developer

25+ years of web development experience spanning higher education and small business. Currently Senior Web Developer at Wake Forest University.

Related Articles

WordPress Enterprise

WordPress REST API for Beginners

11 min read
WordPress Enterprise

WordPress Multisite: When It Makes Sense

10 min read

Need help with WordPress content architecture?

I help organizations design and implement WordPress content structures that scale. Let's discuss your content management needs.

Let's talk about your project.

Send a few sentences about what you're working on. Start a project →

Practice

  • Work
  • Services
  • Web design
  • Process
  • Start a project

Read & explore

  • Writing
  • Lab
  • About
  • Resume

Elsewhere

  • LinkedIn
  • GitHub
  • Email

Based

Roanoke, Virginia
Working in Eastern Time

Selectively available, Q4 2026

© 2026 William Alexander. Built by hand in Roanoke, Virginia.

Set in Inter and Bitter. Running on WordPress, hosted on Flywheel.