Custom post types in WordPress are a feature that allows you to define and create content types different from the default posts and pages.
When you first log into WordPress, you are provided with two content types: pages and posts.
Pages and posts are types of content that you can create and manage on your website. They serve different purposes and have distinct characteristics.
Here is a breakdown of what WordPress pages and posts are:
What is a WordPress page?
- Static content: Pages are typically used for static content that does not change frequently. Examples include the homepage, About Us page, Contact page, Services page, and FAQ page.
- Hierarchical structure: Pages can be organized hierarchically, creating parent–child relationships. This allows you to build subpages or sections within a larger site structure. For example, you can have a “Services” page with individual service subpages nested as child pages.
- Navigation: Pages are commonly used in a website’s navigation menu. They often appear in the main navigation or sidebar as links to key sections of the website.
- Custom templates: You can assign custom templates to specific pages, giving you control over how they are displayed. This is useful for creating unique layouts or designs for particular sections of your site.
What are WordPress posts?
- Dynamic content: Posts are dynamic, author-driven content that is updated regularly and associated with a specific point in time. This includes blog articles, news, announcements, and similar types of content.
- Categories and tags: Categories and tags help create a structured archive of your posts, making it easier for visitors to find related content.
- Archives: Posts are the primary content for blog pages, archives, and RSS feeds. They are displayed in reverse chronological order (from newest to oldest) on your blog page and can be syndicated through various feed readers.
- Comments and discussions: Posts have built-in support for comments and discussions. Visitors can leave comments on your posts, encouraging interaction and engagement.
What are Custom post types?

Pages and posts are the default content types in WordPress, but custom post types allow you to create additional content types that can be used for different purposes.
In the website development process, it is sometimes necessary to create so-called custom post types.
Here are a few examples of typical custom post types:
- Events:
If you want to showcase your events, it’s a good idea to have a calendar where they can be displayed. To add an events calendar, WordPress plugins are commonly used—a popular example is The Events Calendar. This plugin automatically adds a new custom post type for events to your WordPress website. These post types include convenient fields that allow you to enter dates, times, and other key information about your events. - Portfolio:
If you want to present your projects in a portfolio format, you can create a custom post type called portfolio. Fields within this post type may include the project type, project description, client information, and other similar details. - Testimonials:
If you receive a large number of testimonials and recommendations, you can easily organize them using custom post types. You can include the name of the person or organization providing the testimonial, as well as other relevant information such as their website URL, location, and more. - Job listings:
Are you a business looking to hire employees? Adding job openings is common for career and job listing websites, which is why you may need a custom post type to organize your listings by employer, category, salary, location, and more. - Products in online stores:
All products in online stores built with WooCommerce are custom post types. This allows e-commerce store owners to define product categories, attributes, and other fields that can be included with each product. - Other post types:
Real estate listings, recipes, reviews, team members, services, and products are just some of the many custom post types you can create.
Why is it necessary to use Custom Post Types?
- Custom layouts: You can create custom templates for each type of post, adjusting the layout and design to match the content. This is especially useful when different types of content require distinct visual presentations, etc.
- Content reuse: Custom post types allow you to create reusable content structures. For example, you can use a custom post type to store and manage FAQs (frequently asked questions), announcements, portfolios, and other types of custom posts that can be displayed on different pages.
- Client-friendly editing: When creating WordPress websites, custom post types simplify the content management process. Clients can edit content in a user-oriented and focused interface, reducing the risk of accidental changes to other parts of the website.
- Future-proof: If your content structure evolves or you decide to add new features, custom post types make it easy to adapt and expand your website’s capabilities.
How to create a custom post type
To create custom post types, you can use a plugin for creating Custom Post Types: WordPress Creation Kit – Custom Post Types and Custom Fields creator – WCK.
This free plugin is a powerful and flexible tool that allows you to create and manage custom content types, custom fields, and links to them on your WordPress website.
WordPress Creation Kit is a set of 3 cool tools that can help you create and maintain custom content types, custom taxonomies, and above all, custom fields and metaboxes for your posts, pages, or custom post types.
The WordPress Creation Kit plugin uses standard custom fields to store data. You can display custom fields via code or via the Swift Templates module.
WCK Custom Post Type Creator makes it easy to create custom content types by providing a user interface for most of the arguments of the register_post_type() function.
WCK Taxonomy Creator allows you to easily create and edit custom taxonomies in WordPress without any programming knowledge.
The plugin provides a user interface for most arguments of the register_taxonomy() function.
Adding portfolio custom post type publications to your WordPress website
1. Install and activate the CPT UI plugin
From the WordPress dashboard, open the Plugins page. Click on the “Add New” button at the top. Search for the “Custom Post Type UI” plugin. Install and activate the plugin.
2. Import the post type into your portfolio

Return to the WordPress dashboard. You will now see the CPT UI section on the left side of the WordPress admin menu. Go to CPT UI > Tools.
In the “Import Post Types” field, copy and paste the code:
{"portfolio":{"name":"portfolio","label":"Portfolio","singular_label":"Portfolio Item","description":"Portfolio","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","delete_with_user":"false","show_in_rest":"true","rest_base":"","rest_controller_class":"","has_archive":"true","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"true","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"dashicons-images-alt","supports":["title","editor","thumbnail","excerpt","trackbacks","custom-fields","comments","revisions","author","page-attributes","post-formats"],"taxonomies":["post_tag","portfolio_category"],"labels":{"menu_name":"Portfolio","all_items":"Portfolio Items","add_new":"Add new","add_new_item":"Add new Portfolio Item","edit_item":"Edit Portfolio Item","new_item":"New Portfolio Item","view_item":"View Portfolio Item","view_items":"View Portfolio Items","search_items":"Search Portfolio","not_found":"No Portfolio Items Found","not_found_in_trash":"No Portfolio Items Found in Trash","parent":"Parent Portfolio Item:","featured_image":"Featured image for this Portfolio Item","set_featured_image":"Set featured image for this Portfolio Item","remove_featured_image":"Remove featured image for this Portfolio Item","use_featured_image":"Use as featured image for this Portfolio Item","archives":"Portfolio Item archives","insert_into_item":"Insert into Portfolio Item","uploaded_to_this_item":"Upload to this Portfolio Item","filter_items_list":"Filter Portfolio list","items_list_navigation":"Portfolio list navigation","items_list":"Portfolio list","attributes":"Portfolio attributes","name_admin_bar":"Portfolio Item","item_published":"Portfolio Item published","item_published_privately":"Portfolio Item published privately.","item_reverted_to_draft":"Portfolio Item reverted to draft.","item_scheduled":"Portfolio Item scheduled","item_updated":"Portfolio Item updated.","parent_item_colon":"Parent Portfolio Item:"},"custom_supports":""}}
3. Importing taxonomies
While still on the same page, click on the “Taxonomies” section at the top of the page.
Copy and paste the code described below into the field and click on the “Import” button again.
{"portfolio_category":{"name":"portfolio_category","label":"Portfolio Categories","singular_label":"Portfolio Category","description":"Portfolio Categories","public":"true","publicly_queryable":"true","hierarchical":"true","show_ui":"true","show_in_menu":"true","show_in_nav_menus":"true","query_var":"true","query_var_slug":"","rewrite":"true","rewrite_slug":"portfolio-category","rewrite_withfront":"1","rewrite_hierarchical":"0","show_admin_column":"false","show_in_rest":"true","show_in_quick_edit":"true","rest_base":"","rest_controller_class":"","labels":{"menu_name":"Portfolio Categories","all_items":"All Portfolio Categories","edit_item":"Edit Portfolio Category","view_item":"View Portfolio Category","update_item":"Update Portfolio Category name","add_new_item":"Add new Portfolio Category","new_item_name":"New Portfolio Category name","parent_item":"Parent Portfolio Category","parent_item_colon":"Parent Portfolio Category:","search_items":"Search Portfolio Categories","popular_items":"Popular Portfolio Categories","separate_items_with_commas":"Separate Portfolio Categories with commas","add_or_remove_items":"Add or remove Portfolio Categories","choose_from_most_used":"Choose from the most used Portfolio Categories","not_found":"No Portfolio Categories found","no_terms":"No Portfolio Categories","items_list_navigation":"Portfolio Categories list navigation","items_list":"Portfolio Categories list","back_to_items":"Back to Portfolio Categories"},"meta_box_cb":"","default_term":"","object_types":["portfolio"]}}
4. Add items to the portfolio
Click on Portfolio on the left side of the WordPress admin menu.
When you create a portfolio item, you will see that it is very similar to creating a blog post or page!
But instead of being added to the blog posts or pages section, the portfolio is its own post type.
This way, you can keep your portfolio items separate from your blog or pages, and it will have its own archive and category pages.
When you create a portfolio item, don’t forget to upload a featured image and assign it a category just as you would with a blog post.
5. Creating a portfolio page
Go to Pages and create a blank page called “portfolio.”
6. Editing the design and layout of an archive and single post in a portfolio
When you create a portfolio item, you will see that it is very similar to creating a blog post or page!
But instead of being combined with blog posts or pages, the portfolio is its own post type.
This way, you can keep your portfolio items separate from your blog or pages, and it will have its own archive and category pages.
Source: Heartenmade – How To Add A Portfolio Custom Post Type To Your WordPress Website
Conclusion
Planning ahead for organizing your content and types of posts can make your life much easier in the long run and can make it easier to find and display personalized content on your website.
Author: Petar Dimitrov
Rate this publication