Posted on

How To Create And Manage WordPress Custom Post Types?

Want more control over your WordPress content? Learn how to create and manage custom post types using a plugin or simple code. This quick guide walks you through setup, display, and management—all in one place.

WordPress custom post types blog featured image

Last updated on June 11, 2025

When it comes to content management in WordPress, it’s no longer just about posts, pages, or images. Think bigger—like products in your store, customer reviews, discount coupons, event listings, or even job openings. These aren’t your standard content types—they’re custom post types, and they’re game-changers.

Imagine running an online course site. You don’t want your lessons mixed in with blog posts, right? Custom post types let you neatly organize content like “Courses,” “Lessons,” and “Student Submissions,” each with its own structure and purpose.

With the right setup, you can streamline how you create, display, and manage all this content—saving time, cutting down effort, and improving conversions.

In this article, we’ll show you how to create and manage WordPress custom post types using plugins and code, all from one central place.
Let’s dive in!

What exactly are custom post types in WordPress?

In WordPress, a “post type” is just a kind of content. You’ve got:

  • Posts – Time-stamped blog entries
  • Pages – Static content like About or Contact
  • Attachments – Media files with metadata
  • Revisions – Auto-saved versions of content
  • Navigation Menus – Your menu structure
  • Custom CSS – Any styling you’ve added
  • Changesets – Drafts of Customizer settings

Cool, but kinda plain.

Custom post types let you add your own categories of content and your own post types. Think: Events. Testimonials. Courses. Portfolios. Whatever makes your business tick.

Imagine you’re running a membership site—wouldn’t it be awesome to have a separate section just for “Memberships”? Or if you’re rocking a WooCommerce store, how about dedicated post types for products, Orders, Coupons, or Subscriptions? Yup, that’s where custom post types come in.

They let you create content that actually fits your site’s needs. And the best part? Each custom type gets its own spot in your WordPress dashboard—super organized, super clean.

Custom post types let you manage unique content like products, events, or reviews separately from regular posts or pages. You can add custom fields, taxonomies, and layouts—and they get their own menu in the dashboard for easier handling.

Let’s break down how to set them up and make your content work smarter, not harder.

How to create a custom post type in WordPress?

There are two ways to create a custom post type:

  1. Using plugins
  2. Manually
  3. Creating WordPress custom post types using a plugin

    This is the easiest way, especially if you’re not into coding.

  • Use the Custom Post Type UI (CPT UI) plugin — The Custom Post Type Widgets plugin is super popular with over 1 million active installs and makes the whole process a breeze.
  • 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 (e.g., events). This will be part of your URL and must only have letters and numbers.
  • Provide the plural and singular names for your post type.
  • adding new WordPress custom post types
  • Click Populate additional labels based on the chosen labels — this auto-fills the rest of the labels to save you time.
  • Scroll down to Additional Labels — these will appear throughout your WordPress admin when managing this post type.
  • custom post type additional fields
  • Next, in the Post Type Settings, customize the attributes of your post type. Each setting has a description to guide you.
  • custom post type settings
  • Choose if your post type should be hierarchical (like Pages) or not.
  • Select the editing features your post type should support (title, editor, thumbnail, etc.).
  • Finally, click Add Post Type to create it.
  • post editor features

You’re done! Now you can add content to your new post type. We’ll cover how to display it later.

Creating a custom post type manually (using code)

If you deactivate the plugin, your custom post types disappear from the admin, which can cause issues if you manage a lot of content. If you’re comfortable with code, creating CPTs manually is more reliable.

  • 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?

Once your custom post type is created and populated, it’s time to show it off.

Use default archive template

  • Go to WordPress Admin > Appearance > Menus.
  • Add a custom link pointing to your custom post type archive URL:
  • With SEO-friendly permalinks: https://example.com/events
  • Without SEO-friendly permalinks: https://example.com/?post_type=events
  • display custom post type
  • Save your menu and visit the front end of your site. You’ll see the new menu item you added—clicking it will open your custom post type’s archive page, rendered using your theme’s archive.php template.
  • Create custom archive and single templates

    • Create archive-events.php in your theme folder (replace events with your post type slug).
    • Copy the contents of archive.php into it and modify as needed.
    • Similarly, create single-events.php by copying and editing single.php.
    • These custom templates give you full control over how your custom posts are displayed.

    Create custom archive and single templates

    • The second way to display custom post types is by using a dedicated template for custom post type archives.
    • Create archive-events.php in your theme folder (replace events with your post type slug).
    • Copy contents from archive.php and modify as needed.
    • Similarly, create single-events.php for individual post views by copying single.php.
    • These custom templates allow full control over how your custom posts display.

    Show custom posts on the front page

    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 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.

    Smart Manager: The ultimate tool to edit all WordPress post types in bulk

    Here’s the thing—managing multiple post types is great… until you have 100s of entries to edit.

    If that’s the case, you definitely need Smart Manager plugin.

    Smart Manager simplifies the complexities of managing all your WordPress post types. Bulk edit, filter, export CSV, add, delete, duplicate, and customize columns—all in one Excel-like dashboard.

    Smart Manager makes it insanely easy to bulk edit any WordPress post type—posts, pages, products, orders, coupons, you name it—even if you’ve got 100,000+ records. Yep, it’s that fast. And no switching screens needed.

    Smart Manager WordPress posts dashboard

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

    • Quickly bulk edit over 100,000 records: Got a mega summer sale? Instead of editing products one by one, apply a 15% discount across your entire catalog—in just minutes. Yep, even with 100K+ records.
    • Edit all fields without restrictions: Change titles, featured images, prices, SKUs, post statuses (like draft → publish), and more—no limits. Rebranding your blog? Update hundreds of WordPress post types and publish them all at once. No click fatigue required.
    • Search and filter like a pro: Use search, column, and date filters to zoom in on exactly what you need. Looking for posts from last October or products priced $500–$700 with low stock? You’ll find and fix them fast.
    • Add new posts straight from the spreadsheet interface: Planning content? Add multiple blog post drafts or new products right from the grid—way quicker than using the WP editor. Content calendar lovers, rejoice.
    • Bulk delete in seconds: Easily delete old posts, expired listings, test orders, or unused coupons. Store cleanup = done and dusted.
    • Duplicate entries easily: Need a copy of a post, product, or page? Duplicate one, many, or all items in a few clicks. Creating a new course that’s similar to the old one? Clone and customize—it’s that simple.
    • Export CSVs like a boss
      Get the data you need—your way. Export customizable CSVs for all post types and taxonomies. Use them for reporting, inventory planning, or sharing with vendors.
    • Manage everything in one place
      From post titles to images, stock status to SEO tweaks—update everything from one unified interface.

    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 the live demo

    Managing post types with Smart Manager (applications)

    • Step 1: Pick the dashboard for the post type you wanna work with — Products, Orders, Coupons, or whatever.
    • Step 2: Dive in and start editing like a boss.

    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.

    Pro tip: Peek into Smart Manager’s documentation for all the product-specific wizardry.

    Managing orders, coupons, subscriptions…

    Smart Manager orders dashboard

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

    • 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—easy!
    • Memberships: Export data, bulk-upgrade plans, cancel memberships, and more.
    • Subscriptions: Bulk reactivate or cancel, extend trials, add fees—smooth control.
    • Bookings: Adjust prices, reschedule, cancel, export bookings effortlessly.
    • 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—you name it.

    …and literally hundreds more post types.

    Bottom line? Smart Manager is crazy flexible and super powerful.

    Conclusion

    So, we made it—custom post types in WordPress? Handled. If you’d rather skip the code chaos, the Custom Post Type UI plugin is your bestie.

    But hey, if you want to actually enjoy managing all that content without crying into your coffee, meet Smart Manager.

    It’s like having a superpower for your WordPress dashboard—edit, filter, duplicate, delete… all from one sleek, spreadsheet-style view.

    Say goodbye to chaos, and hello to chill, organized control.

    We are sure you’ll thank us later.

    FAQ

    Q1. How to add categories to custom post types in WordPress?
    To add categories to custom post types in WordPress, you need to register a taxonomy for the custom post type using the register_taxonomy() function. This will allow you to create and manage categories.

    Q2. What is the difference between custom post types and pages?
    Custom post types are a way to create new types of content in WordPress, while pages are a built-in type of content used for static pages on a website. Custom post types can have their custom fields and taxonomies, while the pages have a limited set of options for customization.

    Q3. 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.

    Q4. 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.