WordPress Tutorials

WordPress Custom Post Types Explained for Beginners

When you first start a WordPress site, everything looks like a post or a page. You write blog articles, you create an About page, and that seems to cover it. Then one day you want to add a portfolio, a list of team members, or a collection of recipes, and suddenly posts and pages do not feel quite right. That is exactly the problem custom post types solve.

In this guide, WordPress custom post types are explained in plain language. You will learn what a post type is, what makes a custom one different, when you actually need one, and how to create one in two ways: with a beginner friendly plugin and with a small piece of code. You do not need any developer experience to follow the plugin method, and the code method is kept short on purpose.

What Is a Post Type in WordPress?

A post type is simply a category of content inside WordPress. WordPress does not store every piece of content in the same bucket. Instead, it sorts content into types, and each type has its own menu in the dashboard, its own editing screen, and its own way of appearing on your site.

What Are the Built In Post Types?

Every WordPress installation comes with several built in post types. You use most of them without ever thinking about the name.

  • Posts: time based articles such as blog posts and news updates. These appear in your blog feed, can use categories and tags, and usually show a publish date and an author.
  • Pages: timeless content such as an About page, a Contact page, or a Privacy Policy. Pages do not use categories or tags by default, and they are not part of the blog feed.
  • Attachments: files in your media library, such as images, PDFs, and videos. Each uploaded file gets its own attachment entry, even though you rarely edit it directly.
  • Revisions: saved copies of your posts and pages. When you edit a post, WordPress keeps earlier versions so you can restore one if something goes wrong.
  • Navigation menu items: the links inside your menus. You do not create these by writing content, but WordPress stores them as a post type behind the scenes.

Posts and pages are the two types you will use most. Attachments and revisions work quietly in the background. If you are still getting comfortable with the dashboard itself, our guide to the WordPress dashboard explained for beginners will help you find each menu item mentioned here.

What Is a Custom Post Type?

A custom post type, often shortened to CPT, is a new content type that you add yourself. It works just like posts and pages, with its own dashboard menu, its own add new screen, and its own archive page, but it holds a different kind of content.

For example, a restaurant site might add a Menu Items post type. A school site might add a Courses post type. A freelancer site might add a Portfolio post type. Each item inside that type gets a title, an editor, a featured image, and any extra fields the site owner chooses, but it stays separate from blog posts so the blog feed stays clean.

When Would You Want a Custom Post Type?

Custom post types shine when you have a repeatable kind of content. If you will publish many items that share the same structure, a CPT is probably the right tool. Here are common examples.

  • Portfolio projects: each project has a title, a description, images, a client name, and a link. A portfolio CPT keeps them together and easy to browse.
  • Testimonials: each testimonial has a quote, a client name, and maybe a photo. A testimonials CPT lets you display them anywhere with a simple query or shortcode style block, without mixing them into blog posts.
  • Team members: each member has a name, a role, a bio, and a photo. A team CPT gives every member a clean profile page.
  • Recipes: each recipe has ingredients, steps, cooking time, and servings. A recipe CPT keeps the structure consistent from one recipe to the next.
  • Properties: each property has a price, a location, bedrooms, and photos. A properties CPT is far easier to manage than dozens of loose pages.
  • Events: each event has a date, a venue, and a ticket link. An events CPT lets visitors browse upcoming events in date order.

When Do You NOT Need a Custom Post Type?

Not every new section needs a CPT. In fact, many beginners create one too early, and then spend extra time managing a structure they did not need. Here is when a simpler option wins.

  • You only need a few items: a single Services page with sections, or three team bios on one About page, does not need a CPT.
  • A category would do the job: if the items are really just blog posts on one topic, a category inside normal posts is enough. Learn the difference in our guide to WordPress categories versus tags before you add a whole new type.
  • The content is a one off announcement: a sale notice, a holiday message, or a single landing page belongs in a post or a page, not a new type.
  • You are still learning the basics: if you have just installed WordPress, finish the essential setup first. Our checklist of things to do after installing WordPress covers the foundations that matter more than a CPT at the start.

Method 1: Create a Custom Post Type With a Plugin

The easiest route for beginners is the free Custom Post Type UI plugin, often called CPT UI. It gives you a settings screen where you fill in labels and options, and it creates the post type for you without any code. This is the route we recommend for most beginners.

Step 1: Install Custom Post Type UI

Go to Plugins, then Add New, and search for Custom Post Type UI. Install it and activate it. A new menu item called CPT UI will appear in your dashboard sidebar.

Step 2: Add a new post type

Open CPT UI, then Add/Edit Post Types. In the Post Type Slug field, type a short lowercase slug with no spaces, such as portfolio. In the Plural Label field, type Portfolio Projects, and in the Singular Label field, type Portfolio Project. These labels are what you and your visitors will see, so keep them clear.

Step 3: Choose the settings that matter

Scroll through the settings and focus on the important ones. Turn on Has Archive if you want a page that lists all items in this type, such as yoursite.com/portfolio/. Turn on Show in Menus so you can add the archive to your navigation menu later. Under Supports, keep Title, Editor, and Featured Image checked, since almost every CPT needs those three. You can also check Excerpt if you want short summaries on archive pages.

Step 4: Save and test it

Click Add Post Type. A new menu item for your CPT will appear in the sidebar. Click Add New, create a test item with a title and some content, publish it, and view it. Then visit the archive URL to make sure the list page works. If you see a 404 error, go to Settings, then Permalinks, and click Save Changes without changing anything. That refreshes your permalink rules and usually fixes the problem.

Method 2: Create a Custom Post Type With Code

Developers often register a CPT with code instead of a plugin. The advantage is control and fewer plugins, but the code must stay active for the CPT to keep working. If you remove the code, the items are still in the database, but WordPress will no longer show the CPT menu or its archive pages until the code returns. That is why a child theme or a small custom plugin is a better home for this code than a theme file you might replace during an update.

Before you try this method, take a full backup of your site. A small typo in a PHP file can lock you out of the dashboard until the file is fixed, so never edit code on a live site without a backup and a way to restore it. If that warning makes you nervous, stick with Method 1. The result for visitors is the same.

The core function is register_post_type. Here is a simple example that creates a Portfolio post type:

function vtg_register_portfolio_cpt() {
    $args = array(
        'public' => true,
        'has_archive' => true,
        'menu_icon' => 'dashicons-portfolio',
        'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt' ),
        'labels' => array(
            'name' => 'Portfolio Projects',
            'singular_name' => 'Portfolio Project',
        ),
    );
    register_post_type( 'portfolio', $args );
}
add_action( 'init', 'vtg_register_portfolio_cpt' );

In plain language, this code tells WordPress: create a public type called portfolio, give it an archive page, show a portfolio icon in the menu, and let each item have a title, content, featured image, and excerpt. The official documentation on register_post_type explains every argument if you want to go further, including rewrite rules and capabilities.

What Are Custom Taxonomies?

A taxonomy is a way to group content. Categories and tags are the built in taxonomies for normal posts. A custom taxonomy is the same idea, but made for your CPT.

For example, a portfolio CPT might use a Project Type taxonomy with terms like Web Design, Branding, and Photography. A recipe CPT might use a Cuisine taxonomy with terms like Italian, Pakistani, and Mexican. Visitors can then click a term and see every item in that group, exactly like clicking a category on a blog.

How Do Custom Post Types Show Up on Your Site?

A CPT affects three places on your site, and it helps to understand all three before you launch one.

  • Dashboard menu: your CPT gets its own sidebar menu with Add New and All Items screens, just like Posts.
  • Single item pages: each item gets its own URL and page, such as yoursite.com/portfolio/my-first-project/. Your theme controls how that page looks.
  • Archive pages: if Has Archive is on, the CPT gets a list page at yoursite.com/portfolio/ that shows all items. You can add this archive to your menus so visitors can browse the whole collection.

For hosting that handles a growing content library, see our web hosting guide.

Frequently Asked Questions

Do custom post types hurt SEO?

No, not by themselves. A CPT is just a way to organize content. SEO depends on the quality of the content, clear titles, good internal links, and pages that load well. A well organized CPT with useful archive pages can actually help SEO, because visitors and search engines can find related content more easily.

Can I convert normal posts into a custom post type later?

Yes, but it takes a conversion step. Plugins that change post types can move items from Posts into a CPT, and you should set up redirects from old URLs to new ones. Back up first, convert a test item, check its URL and layout, and only then convert the rest.

What happens if I deactivate the CPT UI plugin?

Your CPT items stay in the database, but WordPress will no longer recognize the CPT until the plugin or equivalent code is active again. The dashboard menu and archive pages will disappear in the meantime. That is why it is best to decide on your CPT structure before publishing a large collection, and to keep the plugin active as long as the CPT is in use.

Should every section of my site be a custom post type?

No. Use a CPT only for a repeatable collection with many similar items. Single pages, short announcements, and simple blog topics are better as pages, posts, or categories. Too many CPTs make a site harder to manage, harder to style, and harder for visitors to understand.

Last updated: October 2026.

Hostinger - Get 20% OFF

Habib ur Rehman

Hello! I'm the founder of VU Tech Geek. As a BSCS graduate and experienced WordPress professional, I'm passionate about technology and education. My Virtual University journey has given me valuable insights and knowledge, which I love to share with fellow students.… More »

Related Articles

Leave a Reply

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

Back to top button

Adblock Detected

Please consider supporting us by disabling your ad blocker