Posted on

WordPress Custom Post Types: Go Beyond Posts & Pages

Posts and pages aren't meant to carry everything. Create custom post types for courses, events, portfolios and more, and turn a cluttered WordPress dashboard into a content setup that actually makes sense.

WordPress custom post types blog featured image

Last updated on August 19, 2026

WordPress custom post types (CPTs) let you create content types beyond the default Posts and Pages. They’re useful when your content needs its own structure, fields, taxonomies, templates or workflow.

For example, an online course website could use separate custom post types for Courses and Lessons instead of mixing everything into regular blog posts. The same idea works for events, testimonials, portfolios, properties, case studies and other structured content.

You can create a custom post type using a plugin such as Custom Post Type UI or register one manually with PHP. Once created, you can add content to it, create dedicated archive and single templates, and manage the entries from your WordPress dashboard.

What is a custom post type in WordPress?

A custom post type is a content type you create in WordPress for information that doesn’t fit naturally into regular Posts or Pages.

For example, a website could have:

  • Courses for online learning content
  • Events for upcoming and past events
  • Testimonials for customer reviews
  • Portfolio items for projects
  • Properties for real-estate listings
  • Case studies for customer success stories

Each custom post type can have its own fields, taxonomies, URLs, templates and admin menu. This makes structured content easier to create, organize and manage.

WordPress already has built-in post types such as Posts and Pages. A custom post type simply lets you add another type that fits your site’s content model.

Custom post types vs posts vs pages

The easiest way to decide whether you need a custom post type is to look at how the content will be used.

Content type Best for Examples
Posts Time-based or regularly published content Blog posts, news, updates
Pages Standalone website content About, Contact, Services
Custom post types Structured content with its own fields, taxonomy or workflow Events, Courses, Properties, Testimonials

Use a custom post type when the content has a distinct purpose and needs its own structure or workflow. You don’t need a CPT simply because you want a different design; a reusable block, template or page-builder layout may be enough for that.

How to create a custom post type in WordPress?

There are two common ways to create a custom post type:

  • Using a plugin — easiest for non-developers and site administrators.
  • Using PHP — useful when you’re building a custom theme or plugin and want the CPT registration to be part of your site’s code.

How to create a WordPress custom post type using a plugin

If you don’t want to write code, a plugin is the simplest approach. Custom Post Type UI (CPT UI) is one commonly used option for registering and managing custom post types from the WordPress dashboard.

After installing and activating the plugin, go to WordPress Admin Panel > CPT UI > Add / Edit Post Types.

  • Make sure you’re on the Add New Post Type tab.
  • Enter a slug for your custom post type, such as events. Keep it lowercase and use a simple, URL-friendly value.
  • Enter the plural and singular names for your post type.
adding new WordPress custom post types
  • Click Populate additional labels based on the chosen labels to automatically fill the remaining labels.
  • Review the Additional Labels section. These labels control how your custom post type appears throughout the WordPress admin.
custom post type additional fields
  • Scroll to Post Type Settings and configure the options for your CPT.
  • Choose whether the post type should be hierarchical. Set this to true if you want parent-child relationships similar to Pages.
  • Choose the editor features the post type should support, such as title, editor and featured image.
custom post type settings
  • Review the available editor features and enable the ones your content actually needs.
  • Click Add Post Type to register the custom post type.
custom post type editor features

Your new post type should now appear in the WordPress dashboard, ready for you to add content.

How to create a custom post type manually with PHP

If you’re comfortable with PHP, you can register the custom post type yourself using WordPress’s register_post_type() function. This approach is particularly useful when the CPT is part of a custom plugin or theme.

  • Add the code to your theme’s functions.php file or a site-specific plugin.
  • Here’s a simple example:
    // Our custom post type function
    function create_posttype() {
      
        register_post_type( 'events',
        // CPT Options
            array(
                'labels' => array(
                    'name' => __( 'Events' ),
                    'singular_name' => __( 'Event' )
                ),
                'public' => true,
                'has_archive' => true,
                'rewrite' => array('slug' => 'events'),
                'show_in_rest' => true,
      
            )
        );
    }
    // Hooking up our function to theme setup
    add_action( 'init', 'create_posttype' );
    
  • This registers an “events” post type with basic options.
  • The labels array sets the names, and the second array controls visibility, permalink structure and block editor support.

Bonus: You can also hook in custom taxonomies, meta fields and REST API settings.

More advanced example with extra features

Let’s take a look at more detailed code that adds additional options to your custom post type:

/*
* Creating a function to create our CPT
*/
  
function custom_post_type() {
  
// Set UI labels for Custom Post Type
    $labels = array(
        'name'                => _x( 'Events', 'Post Type General Name', 'twentytwentyone' ),
        'singular_name'       => _x( 'Event', 'Post Type Singular Name', 'twentytwentyone' ),
        'menu_name'           => __( 'Events', 'twentytwentyone' ),
        'parent_item_colon'   => __( 'Parent Event', 'twentytwentyone' ),
        'all_items'           => __( 'All Events', 'twentytwentyone' ),
        'view_item'           => __( 'View Event', 'twentytwentyone' ),
        'add_new_item'        => __( 'Add New Event, 'twentytwentyone' ),
        'add_new'             => __( 'Add New', 'twentytwentyone' ),
        'edit_item'           => __( 'Edit Event’, 'twentytwentyone' ),
        'update_item'         => __( 'Update Event’, 'twentytwentyone' ),
        'search_items'        => __( 'Search Event', 'twentytwentyone' ),
        'not_found'           => __( 'Not Found', 'twentytwentyone' ),
        'not_found_in_trash'  => __( 'Not found in Trash', 'twentytwentyone' ),
    );
      
// Set other options for Custom post Type
      
    $args = array(
        'label'               => __( 'Events', 'twentytwentyone' ),
        'description'         => __( 'Event data', 'twentytwentyone' ),
        'labels'              => $labels,
        // Features this CPT supports in Post Editor
        'supports'            => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', ),
        // You can associate this CPT with a taxonomy or custom taxonomy. 
        'taxonomies'          => array( 'genres' ),
        /* A hierarchical CPT is like Pages and can have
        * Parent and child items. A non-hierarchical CPT
        * is like Posts.
        */
        'hierarchical'        => false,
        'public'              => true,
        'show_ui'             => true,
        'show_in_menu'        => true,
        'show_in_nav_menus'   => true,
        'show_in_admin_bar'   => true,
        'menu_position'       => 5,
        'can_export'          => true,
        'has_archive'         => true,
        'exclude_from_search' => false,
        'publicly_queryable'  => true,
        'capability_type'     => 'post',
        'show_in_rest' => true,
  
    );
      
    // Registering your Custom Post Type
    register_post_type( 'events', $args );
  
}
  
/* Hook into the 'init' action so that the function
* Containing our post type registration is not 
* unnecessarily executed. 
*/
  
add_action( 'init', 'custom_post_type', 0 );
  • This version includes more options like support for revisions, thumbnails, custom fields and custom taxonomies (genres).
  • The 'hierarchical' => false means it behaves like posts, not pages. Change to true if you want a page-like structure.
  • The 'twentytwentyone' string is the text domain for translations—replace it with your theme’s domain.
  • To find your theme’s text domain, open the style.css file located in your theme’s directory. You’ll see the text domain listed in the file’s header section.

How to display custom post types on your WordPress site?

Creating a CPT only gives you the content structure. You also need to decide how visitors will find and view that content.

There are several ways to display custom post types, depending on how much control you need.

Use the default custom post type archive

If your CPT is registered with an archive, WordPress can generate an archive page listing its entries.

  • Go to WordPress Admin > Appearance > Menus.
  • Add a Custom Link pointing to your custom post type archive URL.
  • With a standard permalink structure, an archive could look like https://example.com/events.
  • Save the menu and visit the front end of your website.
display custom post type

WordPress will use the appropriate archive template from your theme to display the custom post type entries.

Create custom archive and single templates

If you need more control over the design, you can create templates specifically for your custom post type.

  • Create archive-events.php in your theme directory, replacing events with your CPT slug.
  • Use your existing archive.php as a starting point and customize the layout.
  • Create single-events.php to control how individual Event entries are displayed.
  • Customize these templates to show fields, taxonomies, images or other information specific to your CPT.

Display custom post types elsewhere on your site

You can also query your custom post type and display selected entries on another page, your homepage or a custom template.

For example:
Add this code to your functions.php or a site plugin:

add_action( 'pre_get_posts', 'add_my_post_types_to_query' );
  
function add_my_post_types_to_query( $query ) {
    if ( is_home() && $query->is_main_query() )
        $query->set( 'post_type', array( 'post', ‘events' ) );
    return $query;
}

Replace 'events' with your CPT slug to include those posts on the homepage.

Query custom post types in templates

To fetch and display custom posts anywhere, use this snippet:

<?php
$args = array( 'post_type' => 'events', 'posts_per_page' => 10 );
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) :
   while ( $the_query->have_posts() ) :
      $the_query->the_post(); ?>
      <h2><?php the_title(); ?></h2>
      <div class="entry-content">
         <?php the_content(); ?> 
      </div>
    <?php endwhile;
    wp_reset_postdata();
else: ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>

This code fetches up to 10 posts from your custom post type and displays their title and content.

Display custom posts in widgets

  • Install the Custom Post Type Widgets plugin.
  • Go to Appearance > Widgets.
  • Drag the Recent Posts (Custom Post Type) widget to a sidebar.
  • Choose your custom post type from the dropdown and configure options.
  • Save and check your site to see recent custom posts in action.

Display custom posts in widgets

  • Install the Custom Post Type Widgets plugin.
  • Go to Appearance > Widgets.
  • Add the Recent Posts (Custom Post Type) widget to your sidebar.
  • Choose your custom post type and configure the available options.
  • Save the widget and check the front end of your site.

How to manage custom post types in bulk?

Creating a custom post type is easy. Managing hundreds or thousands of entries one by one is where things can become tedious.

Smart Manager provides a spreadsheet-style interface for managing supported WordPress post types and WooCommerce data. You can filter records, edit fields inline, update multiple records, export data and perform other bulk actions without opening every entry individually.

Smart Manager WordPress posts dashboard

Here’s how Smart Manager simplifies managing your post types:

  • Bulk edit 100,000+ records with ease: Running a massive sale? Instead of updating products individually, apply a 15% discount across your entire catalog in just minutes — yes, even if you have over 100K items.
  • Edit any field without limitations: Update titles, featured images, prices, SKUs, stock statuses or even switch posts from draft to published — all in one place. Refreshing your brand? Revise and publish hundreds of post types at once.
  • Use filters: Search, column filters and date filters help you zero in on specific data instantly. Whether you’re tracking down posts from last October or products priced between $500–$700 that are running low on stock — you’ll locate and update them in seconds.
  • Add new posts directly: Planning your content or product lineup? Create multiple blog drafts or new products straight from the spreadsheet-like interface.
  • Bulk delete in seconds: Clear out old posts, expired listings, test orders or unused coupons with a couple of clicks.
  • Duplicate entries easily: Need a copy of a product, post or page? Duplicate one — or many — instantly. Perfect when you’re creating a new course, page layout or product that’s similar to an existing one.
  • Export fully customizable CSVs: Export exactly the data you need — across all post types and taxonomies. Ideal for reporting, inventory planning, audits or sharing information with vendors.
  • One unified dashboard: Update titles, descriptions, images, pricing, stock, SEO fields and more — without hopping across multiple screens.

Smart Manager puts all your content controls in one easy-to-use dashboard. It isn’t just a plugin—it’s your WordPress command center.

Try Smart Manager live demo

Managing post types with Smart Manager (applications)

Open Smart Manager and pick the dashboard for the post type you want to work with — Products, Orders, Coupons or whatever. Now, you can edit the records accordingly.

Managing Products post-type

WooCommerce Smart Manager products dashboard

Check out the Products dashboard for WooCommerce in Smart Manager—here’s what you can do:

  • Instantly update stock status, prices (regular & sale), descriptions and more—all right there in the grid.
  • Add new products on the fly without leaving the dashboard.
  • Use advanced filters to zero in on products, like “all items priced between $100 and $200.”
  • Bulk-edit 600+ products in seconds, say, slashing prices by 10%.
  • Delete test or old products permanently with one click.
  • Duplicate your entire product list or filtered selections easily.
  • Export product data to CSV whenever you need.
  • Create custom views like a ‘stock log’ to keep tabs on inventory.

…and loads more magic under the hood. (Read the Smart Manager’s documentation)

Managing orders, coupons, subscriptions…

Smart Manager isn’t just for products. You can select your post type dashboard and manage everything with total freedom:

Smart Manager orders dashboard
  • Posts and pages: Edit titles, images and switch status from draft to publish.
  • Orders: Update order status, billing/shipping info, currency and custom fields.
  • Coupons: Tweak usage limits, amounts, types, expiry dates or delete coupons.
  • Users (Customers): View lifetime value, update billing/shipping and change login info.
  • Media: Change titles, content, authorship, menu order.
  • Memberships: Export data, bulk-upgrade plans, cancel memberships and more.
  • Subscriptions: Bulk reactivate or cancel, extend trials, add fees.
  • Bookings: Adjust prices, reschedule, cancel, export bookings.
  • Extra product options: Manage gift wrapping, shipping add-ons, upsells.
  • Dropshipping: Control suppliers, stock, prices.
  • Multi-vendors: Add vendors, manage shipments, commissions, customer notes.
  • LMS: Handle courses, lessons, lengths, difficulty levels, duplicate courses.
  • Advanced custom fields: Edit all field types — checkboxes, thumbnails, radios, files.

…and literally hundreds more post types.

Bottom line? Smart Manager is highly effective at managing all post types, including orders, discounts, subscriptions, memberships and more.

Conclusion

Custom post types give WordPress a flexible way to manage structured content beyond regular posts and pages. You can create them with a plugin if you want a simpler workflow, or register them with PHP when you’re building a custom theme or plugin.

Once your CPT is set up, you can add taxonomies and custom fields, create dedicated archive and single templates, and display the content wherever you need it. If your custom post type grows into hundreds or thousands of records, a bulk-management tool such as Smart Manager can make ongoing updates much faster.

The key is to create a custom post type when your content genuinely needs its own structure or workflow, not simply because you want to change its design.

FAQ

What is the difference between a custom post type and a custom taxonomy?
A custom post type defines the type of content you create, while a custom taxonomy organizes that content into groups. For example, Events could be a custom post type and Event Categories could be a custom taxonomy.

Can a custom post type have its own categories and tags?
Yes. You can associate existing categories or tags with a custom post type, or create custom taxonomies specifically for that content type.

What happens if I deactivate the plugin that created my custom post type?
The content may remain in the database, but the post type registration can disappear from the WordPress dashboard. For important content, consider whether the CPT should be registered through a site-specific plugin or custom code.

Can custom post types have their own URL structure?
Yes. You can configure a rewrite slug for a CPT and give its entries a URL structure such as example.com/events/event-name.

Do custom post types affect SEO?
A custom post type itself doesn’t automatically improve or hurt SEO. SEO depends on how you structure, optimize and index its individual entries, archives, taxonomies and URLs.

What are some benefits of using a custom post type generator for WordPress?
Using a custom post types generator for WordPress provides benefits such as streamlined creation and management of custom content types, improved content organization, enhanced user experience, increased flexibility in designing unique layouts and functionalities for different content types and efficient content management through customized backend settings.

Where are custom post types saved in WordPress?
Custom post types are saved in the WordPress database.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.