WordPress Custom Post Types – A Comprehensive Guide for Users and Developers

By Vrushali Gadekar | January 12, 2016

In early days WordPress has started as a blogging platform, But now it is more than a blogging platform, thanks to the development in the software by WordPress developers from places like https://www.devio.digital/. It is a Content Management System (CMS), Which allows to customize each and every section of WordPress. WordPress can hold and display different content. WordPress provide us two main content type “Post” and “Pages”. When you are adding content into WordPress you must think about which type of content it is and Is the content going to fit more into a post type or page type?? This will be a big question for you if your content is particular and it will not fit into any of them. WordPress itself has given a solution for that, you can create a ” Custom Post Type”. For example, You might want to include books as a custom post type on your website, ideally you’d like to have the option to specify the book’s author, the page count, genre, publisher and other book-specific data. Custom post type allows to have different custom fields and even its own custom category structure. Now, Let’s dig up what actually custom post type is??
Custom Post Types Guide WordPress

What is Custom Post Type?

The term Custom post type has been introduced in WordPress 1.5, more specifically since February 17, 2005. It is nothing but a regular post, which has different post_type in wp_posts table. It will have a different set of data. It has dedicated editor & media up-loader. You can also create custom taxonomies to organise your content more effectively. 

Need of custom post type: Suppose you want to add products on your website. Product contents doesn’t fit and look good into post content type, Categories and tags don’t help you in grouping and sorting products, Or you want to add additional fields to add more information. Then you will need to create a product as a custom post type. You can get custom WordPress development services to do this for you. Custom Post Types help us to keep different types of posts in different sections. It separates our regular posts from others. It is as simple as that.

Creating a new custom post type will add a new item on the admin menu for this new post type so that you can easily create new content. WooCommerce plugin has used product custom post type to sort out your products from post and pages. Lets have a look how it looks on dashboard.

Custom post type on menu

In above picture you can see a new menu item has been added as a product. Products, Add Product, Categories, Tags, Shipping Classes & Attributes are sub-menus of Product menu. You can view list of all the products under product custom post type. You can add new product in Add Product sub-menu. You can add taxonomies using category and tags. Even You can add different attributes related to your product.

In order to view product on front end, click on view option of product And you will see a product on front end like this,

Product-Front End (1)

What are Custom Taxonomies? 

Taxonomies allows to group things together and help us to search posts belonging to a specific group.  In regular posts the taxonomy used in grouping your content topics can either be a category or a tag. It is not necessary to always use category and tags.You can use custom taxonomies to create custom groups and bring them under one roof. For example, you have a custom post type called Product. You can register a new custom taxonomy called Gender. You can add gender terms Male & Female . This would allow you and your users to sort your products by Gender.

In following Example, A custom taxonomy ‘Testimonial Categories’ has been added in our Testimonials CPT. Now you will be able to add new categories from the admin panel and assign each of them to testimonial CPT.

Custom Taxonomy (1)

Custom Taxonomy 2 (1)

This was an overview of Custom Post type and Custom Taxonomy. Lets move towards developing the custom post type and custom taxonomies.

To define a new custom post type you need to use the function register_post_type(). This function takes 2 parameters the first being the new name for the post type and the second being a list of arguments to define the behavior for the post type.

<?php register_post_type( $post_type, $args );
add_action( 'init', 'create_post_type' );
function create_post_type() {
$args = array();
register_post_type( 'post_type_name', $args); 

There is a list of arguments that you send to this function and each will define how the post type can be used.

  • label – The plural descriptive name for the post type.
  • labels – A descriptive names for the post types.
  • description – (Optional) A short description of the post type.
  • public – (Optional) A boolean value on if the post type can be seen by the public and therefore can be viewed from the front-end. Its default value is false.
  • exclude_from_search – (Optional)  A boolean value on if this post type can be searched. Its default value is value of the opposite of public argument. If the value is true then search-term will not include posts of this post type and if the value is false thensearch-term will include posts of this post type.
  • publicly_queryable -(Optional) A boolean value on if this post type can be queried. Its default value is value of public argument.
  • show_ui – (Optional) A boolean value on if WordPress will generate a UI to manage the post type. Its default value is value of public argument. If value it true then display a user-interface (admin panel) for this post type else do not display a user-interface for this post type
  • show_in_nav_menus -(Optional)  A boolean value to decide if you can display this post type on menus. Default value is value of public argument.
  • show_in_menu – (Optional) A boolean value to decide if this post type is displayed in the admin menu. Default value is value of show_ui argument. If false it will not display in the admin menu and if true display as a top level menu.
  • show_in_admin_bar -(Optional) A boolean value to decide if the post type is displayed in the admin bar.  Default value is value of the show_in_menu argument.
  • menu_position -(Optional) An integer to position the post type menu. Default value is null.
  • menu_icon – (Optional) A URL to display an icon next to the menu item. It will take post icon by default.
  • capability_type –  (Optional) The string to use to build the read, edit, and delete capabilities. The ‘capability_type’ parameter is used as a base to construct capabilities unless they are explicitly set with the ‘capabilities’ parameter. It can be an array to allow for alternative plurals when using this argument as a base to construct the capabilities.
  • capabilities -(Optional)  An array of the capabilities for this post type.
  • map_meta_cap -(Optional)  A boolean value to decide if you want to use the default meta handling. Its default value is null.
  • hierarchical – (Optional) A boolean value to decide if this post type can be assigned to categories/tags. The ‘supports’ parameter should contain ‘page-attributes’ to show the parent select box on the editor page.
  • supports –  (Optional) It can be a boolean value or an array of the post features this post type supports. A boolean false can be passed as value instead of an array to prevent default (title and editor) behavior.
  • register_meta_box_cb -(Optional) To provide a callback function to create any post meta boxes.  The callback function takes one argument $post, which contains the WP_Post object for the currently edited post.
  • taxonomies -(Optional) An array of registered taxonomies that this post type can use.
  • has_archive -(Optional) A boolean value to enable post types.
  • rewrite -(Optional) An array of how the URL slugs will be rewritten.
  • query_var – (Optional) A string to set the key for the post type.
  • can_export -(Optional) A boolean value to check if this post can be exported.

Here a is example of using these arguments to create your custom post type.

add_action( 'init', 'register_custom_post_type_name' );
function register_custom_post_type_name() {
		$labels = array(
			'name' => __( 'plural post type name', 'text_domain' ),
			'singular_name'=> __( 'single post type name', 'text_domain' ),
			'add_new' => _x( 'Add New single post type name','${4:Name}','text_domain'),
			'add_new_item'=> __( 'Add New single post type name', 'text_domain}' ),
			'edit_item' => __( 'Edit single post type name', 'text_domain' ),
			'new_item' => __( 'New single post type name', 'text_domain' ),
			'view_item' => __( 'View single post type name', 'text_domain' ),
			'search_items'=> __( 'Search plural post type name', 'text_domain' ),
			'not_found' => __( 'No plural post type name found', 'text_domain' ),
			'not_found_in_trash' => __( 'No plural post type name found in Trash','text_domain' ),
			'parent_item_colon'=> __( 'Parent single post type name:', 'text_domain' ),
			'menu_name' => __( 'plural post type name found', 'text_domain' ),
		$args = array(
			'labels' =>$labels,
			'hierarchical' => true,
			'description' => 'description',
			'taxonomies' => array( 'category' ),
			'public' => true,
			'show_ui' => true,
			'show_in_menu' => true,
			'menu_position' => 5,
			'menu_icon' => '',
			'show_in_nav_menus' => true,
			'publicly_queryable' => true,
			'exclude_from_search' => false,
			'has_archive' => true,
			'query_var' => true,
			'can_export' => true,
			'rewrite' => true,
			'capability_type' => 'post',
			'supports' => array(
			'title', 'editor', 'author', 'thumbnail',
			'custom-fields', 'trackbacks', 'comments',
register_post_type( 'custom_post_type_name', $args );

If you want to add custom post type in your plugin then open your plugin file say my_plugin.php and before the closing of the PHP command add register_post_type function() or you can add above code. If you are creating a custom post type in theme then add this function into function.php file of theme.

I have created a plugin named as portfolio-plugin and add custom post type “Portfolio” in main plugin file mean in portfolio-plugin.php file and a new menu appeared on my dashboard menu.

//* Create Custom Post Type
add_action( 'init', 'add_custom_post_type' );
function add_custom_post_type() {

	register_post_type( 'Portfolio',
			'labels' => array(
				'name'          => __( 'Portfolios'),
				'singular_name' => __( 'Portfolio'),
				'add_Portfolio'            => _x( 'Add New', 'Portfolio' ),
				'edit_item'          => __( 'Edit Portfolio' ),
				'new_item'           => __( 'New Portfolio' ),
				'all_items'          => __( 'All Portfolio' ),
				'view_item'          => __( 'View Portfolio' ),
				'search_items'       => __( 'Search Portfolio' ),
			'has_archive'  => true,
			'hierarchical' => true,
                        'menu_icon'    => 'dashicons-admin-users',
			'public'       => true,
			'rewrite'      => array( 'slug' => 'portfolios', 'with_front' => false ),
			'supports'     => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'revisions', 'page-attributes' ),
			'menu_position' => 2,


CPT Portfolio (2)

Here you can see a portfolio menu has been added and you can add new portfolio in “Add New” sub-menu. Now I want to add a custom taxonomy named as a “Platform”. Where I can list out my portfolios in different platform such as  WordPress, Magento, HTML, Opencart etc. In order to add taxonomy you need to use the function 

<?php register_taxonomy( $taxonomy, $object_type, $args ); ?> 

This function will take 3 parameters, the name of the taxonomy, the post type to assign the taxonomy and arguments to define the taxonomy.

<?php register_post_type( $post_type, $args );
add_action( 'init', 'register_new_taxonomy' ); 
function register_new_taxonomy() {
     register_taxonomy( $taxonomy, $object_type, $args ); 
  • $taxonomy – The name for the taxonomy.
  • $object_type – This can be a string or an array for the post types to assign the custom taxonomy.
  • $args – An array of arguments to define the custom taxonomy.


The arguments that you can define for the taxonomy are:

  • label – (optional)  The plural descriptive name for the taxonomy.
  • labels -(optional)  An array of different descriptive names for the taxonomy. If it is empty name is set to label value, and singular_name is set to name value.
  • public –  (optional) A boolean value to if the taxonomy can be seen on the admin UI. Default value is true.
  • show_ui –  (optional) A boolean value to generate the default UI in the admin area for the taxonomy. If it is not set, it will take value of public argument by default.
  • show_in_nav_menus -(optional) A boolean value to decide if the taxonomy can be added to the navigation menus. By default it take value of show_ui argument. If false, will not display in the admin menu and if true, show as a submenu of associated object types
  • show_tagcloud –  (optional)  A boolean value to decide if the taxonomy can be used in a tag cloud. Default value is value of show_ui argument.
  • show_in_quick_edit – (optional) It will decide whether to show the taxonomy in the quick/bulk edit panel.
  • meta_box_cb –  (optional) It Provides a callback function name for the meta box display.
  • show_admin_column –  (optional)  A boolean value to allow automatic creation of taxonomy columns on associated post-types. Default value is false.
  • hierarchical –  (optional)  A boolean value to decide if the taxonomy can be hierarchical.
  • update_count_callback – (optional)  function name that will be called when the count of an associated $object_type.
  • query_var – (optional)  A boolean value to decide if the taxonomy can be used in query_var.
  • rewrite – (optional)  An array to define the rewrite rules for the taxonomy.
  • capabilities -(optional) An array to define the capabilities for the taxonomy.
  • sort –  (optional) A Boolean value to remember the order of the taxonomy.

Below is a basic example of how you can use register_taxonomy() to create your own custom taxonomy.

add_action( 'init', 'register_new_taxonomy' ); 
function register_new_taxonomy() {
   $labels = array(
	'name'				=> _x( 'plural taxonomy', 'Taxonomy general name', 'text_domain' ),
	'singular_name'			=> _x( 'single taxonomy', 'Taxonomy singular name', 'text_domain' ),
	'search_items'			=> __( 'Search plural taxonomy', 'text_domain' ),
	'popular_items'			=> __( 'Popular plural taxonomy', 'text_domain' ),
	'all_items'			=> __( 'All plural taxonomy', 'text_domain' ),
	'parent_item'			=> __( 'Parent single taxonomy', 'text_domain' ),
	'parent_item_colon'		=> __( 'Parent single taxonomy', 'text_domain' ),
	'edit_item'			=> __( 'Edit single taxonomy', 'text_domain' ),
	'update_item'			=> __( 'Update single taxonomy', 'text_domain' ),
	'add_new_item'			=> __( 'Add New single taxonomy', 'text_domain' ),
	'new_item_name'			=> __( 'New single taxonomy Name', 'text_domain' ),
	'add_or_remove_items'	=> __( 'Add or remove plural taxonomy', 'text_domain' ),
	'choose_from_most_used'	=> __( 'Choose from most used plural taxonomy', 'text_domain' ),
	'menu_name'			=> __( 'single taxonomy', 'text_domain' ),
	$args = array(
		'labels'		=> $labels,
		'public' 		=> true,
		'show_in_nav_menus'	=> true,
		'hierarchical'		=> true,
		'show_tagcloud'		=> true,
		'show_ui'		=> true,
		'rewrite'		=> true,
		'query_var'		=> true,
		'show_admin_column'     => false,
		'capabilities'		=> '',
	register_taxonomy( 'taxonomy-id', array( 'post', 'custom-post-type' ), $args );

In order to add custom taxonomy for my “Portfolio” custom post type I have added register_taxonomy() function in my plugin file and a new sub-menu has displayed. Which is a new taxonomy for Portfolio.

Taxonomy (1)

This is how you can create Custom Post Type and Custom Taxonomy in your plugin or theme. Now if you want to add custom data to your custom post type without requiring to use the default custom fields in the editor theme, Creating a meta box is good solution. It is very easy to add meta box in WordPress for custom post type. To create our embedded meta box we need to use the function add_meta_box() and attach this to the action add_meta_boxes.

add_meta_box( $id, $title, $callback, $post_type, $context, $priority, $callback_args );

This function takes seven parameters:

  • ID – (required) Used as the meta ID. It is an attribute of the edit screen section. Its default value is none.
  • Title – (required) Meta box title visible on the edit page. By default it is null.
  • Callback – (required) Callback function to display the HTML.  The callback can accept up to two arguments: the first argument is the $post object for the post or page that is currently being edited. The second argument is the full $metabox item (an array)
  • Screen – (optional) The type of writing screen on which to show the edit screen section. For example ‘post’, ‘page’,’dashboard’,’link’,’attachment’,’custom_post_type’ etc.
  • Context –  (optional) The type of context this is displayed on choices of normal, advanced or side. If not supplied will be advanced.
  • Priority – (optional) Priority of order the boxes will be displayed. ('high', 'core', 'default' or 'low')
  • Callback Args – (optional) Additional arguments passed to the callback function.
function plugin_add_meta_box() {
	$screens = array( 'post', 'page' );
	foreach ( $screens as $screen ) {
			__( 'Metabox Title', 'plugin_textdomain' ),
add_action( 'add_meta_boxes', 'plugin_add_meta_box' ); ?>

We have added custom post type, custom taxonomies, custom meta box up to now. But it is not well enough to add data in WordPress, You must display it in proper way. Creating a custom template files to display custom post type is the proper way of displaying it. Here we shall create a template which displays all the portfolios entered using the portfolio Custom Post Type.

First you need to add following code in your portfolio-plugin.php file. This registers a function to be called when the WordPress admin interface is visited.

add_filter( 'template_include', 'include_template_function', 1 );
 function include_template_function( $template_path ) {
    if ( get_post_type() == 'portfolios' ) {
        if ( is_single() ) {

            if ( $theme_file = locate_template( array ( 'single-portfolio.php' ) ) ) {
                $template_path = $theme_file;
            } else {
                $template_path = plugin_dir_path( __FILE__ ) . '/single-portfolio.php';
    return $template_path;

This code searches for a template like single-(post-type-name).php in the current theme directory. If it is not found then it looks into the plugin directory for the template, which we supply as a part of the plugin. The template_include hook was used to change the default behavior and enforce a specific template. Now create a file named as single-portfolio.php which will have following loop, in order to display a single portfolio.

// single-portfolio.php

As we have created a custom template for our CPT, we can also create a custom archive page overriding the default archive template. Open the plugin file portfolio-plugin.php and the add the else code in the include_template_function function.

add_filter( 'template_include', 'include_template_function', 1 );
 function include_template_function( $template_path ) {
    if ( get_post_type() == 'portfolios' ) {
        if ( is_single() ) {
<blockquote class="wp-embedded-content" data-secret="QnEk1chUrG"><a href="https://wordpress.org/plugins/custom-post-type-ui/">Custom Post Type UI</a></blockquote><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted" style="position: absolute; clip: rect(1px, 1px, 1px, 1px);" title="“Custom Post Type UI” — Plugin Directory" src="https://wordpress.org/plugins/custom-post-type-ui/embed/#?secret=RVdJs9gce0#?secret=QnEk1chUrG" data-secret="QnEk1chUrG" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
            if ( $theme_file = locate_template( array ( 'single-portfolio.php' ) ) ) {
                $template_path = $theme_file;
            } else {
                $template_path = plugin_dir_path( __FILE__ ) . '/single-portfolio.php';
        elseif ( is_archive() ) {
            if ( $theme_file = locate_template( array ( 'archive-portfolios.php' ) ) ) {
                $template_path = $theme_file;
            } else { $template_path = plugin_dir_path( __FILE__ ) . '/archive-portfolios.php';
    return $template_path;

WordPress searches through the theme directory for an archive template file before using the default one. This function checks if the user has provided an archive template in the theme directory else it looks for the file in the plugin’s folder.

// code for theme archive file

This is how you can create template files for custom post types. Now if you want to create a file for taxonomy ‘platform ‘, you can create ‘Platform’ taxonomy archive template file. WordPress uses the ‘archive.php’ template by default. This is true if you don’t assign a custom template in displaying your custom taxonomy archive. The template is used in rendering the custom taxonomy archive content.

Locate the file archive.php in your theme and save it as taxonomy-{taxonomy_slugname}.php. The taxonomy slug name can be created using Types. So for the portfolios taxonomy, let’s simply name it “portfolio”. WordPress will now use this template file instead of archive.php to display your custom taxonomy archive.

There are number of functions WordPress has provided for handling custom post types. I have listed few functions,

1. add_post_type_support() :
It registers support of certain features for a post type. All core features are directly associated with a functional area of the edit screen, such as the editor or a meta box. Features include: ‘title’, ‘editor’, ‘comments’, ‘revisions’, ‘trackbacks’, ‘author’, ‘excerpt’, ‘page-attributes’, ‘thumbnail’, ‘custom-fields’, and ‘post-formats’.

$post_types: (Required) The post type for which to add the feature.
$supports : (Required) The feature being added, accepts an array of feature strings or a single string.

2. remove_post_type_support() :
It will remove support for a feature from a post type.

$post_type :(Required) The post type for which to remove the feature.
$feature : (Required) The feature being removed.

3. post_type_supports() :
It will check a post type’s support for a given feature and return a Boolean value Whether the post type supports the given feature.

$post_type :(Required) The post type being checked.
$feature :(Required) The feature being checked.

4. post_type_exists() :
It will check if a post type is registered and return a boolean value.

$post_type :(Required) Post type name.

5. set_post_type() :
It will update the post type for the post ID. The page or post cache will be cleaned for the post ID.

$post_id :(Optional) Post ID to change post type. Its defauly value is 0.
$post_type : (Optional) Post type. Accepts ‘post’ or ‘page’ to name a few. its default value is ‘post’.

6. get_post_type():
It retrieves the post type of the current post or of a given post and returns string or false. Post type on success, false on failure.

$post : Post ID or post object. Default is global $post.

7. get_post_types() :
It provides a list of all registered post type objects. It will return an array.

$args : (Optional) An array of key => value arguments to match against the post type objects.
$output :(Optional) The type of output to return. Accepts post type ‘names’ or ‘objects’.
$operator :(Optional) The logical operation to perform. ‘or’ means only one element from the array needs to match; ‘and’ means all elements must match. Accepts ‘or’ or ‘and’.

8. get_post_type_object() :
It will retrieve a post type object by name.

$post_type : (required) The name of the post type as used when registering the post type.

9. get_post_type_capabilities() :
Builds an object with all post type capabilities out of a post type object. Post type capabilities use the ‘capability_type’ argument as a base, if the capability is not set in the ‘capabilities’ argument array or if the ‘capabilities’ argument is not supplied.

$args : (required) The desired capability type. Set [‘capability_type’] to an array to allow for alternative plurals when using this argument as a base to construct the capabilities.

10. is_post_type_hierarchical() :
It will check whether the post type is hierarchical and return boolean value, might also mean that the post type does not exist.

$post_type : (Required) Post type name

11. is_post_type_archive() :
It will check whether the query for an existing post type archive page, and return boolean value.

$post_types : (Optional) Post type or array of posts types to check against.

12. post_type_archive_title() :

It will display or retrieve title for a post type archive. This is optimized for archive.php and archive-{$post_type}.php template files for displaying the title of the post type.

$prefix : (Optional) What to display before the title.
$display :(Optional) Whether to display or retrieve title.

Just like above function there are many more functions. This all is coding part that will help you in creating custom post type and use it in better way by using functions. There and some tools and plugins available on WordPress that makes your work easy. I have listed few of them below.

GenerateWP Tool ::

WordPress developer always struggle with custom post type, custom taxonomy, Creating metaboxes. GenerateWP is a tool which has many generators which will do your job. You just have to fill options in their user interface and add code into your file. GenerateWP was developed as a set of tools with intent to reduce development time and to avoid writing the same code over and over.

For example : Taxonomy Generator, Post Type Generator, Post Status Generator, Theme Support Generator, Sidebar Generator, Menu Generator, Shortcodes Generator, Quicktags Generator and many more.

Post type Generator : In post type generator you will see few tabs and some text boxes on screen. Those are for input values of your custom post type. While developing the code you have to write a function register_post_type() with so many arguments. Rather that writing a code it provide user interface to add those arguments in the form of text box values. Following are some screen shots which will describe those tabs and their input values.

General tab :
General tab

In this tab you have to input your custom post type name, Whether you want to add child theme support or not, Text Domain of your file.

Post type tab :


In this tab you have to pass the values for your custom post type like post_type key, Description of CPT,  Singular name of your CPT, Plural name of CPT, Taxonomies link etc

Labels tab :


In labels type You have to add all those value which you added in $labels array. i.e. Menu name, Admin Bar name, Parent name etc.

Options Tab :


In options tab you will add option values for field like Exclude From Search, Enable Archives, Enable Export, Custom Archive Slug.

Visibility Tab :


In visibility tab, Public field is for option whether you want to show post type in admin UI, Show Post type UI in the admin, You can set Admin Sidebar Icon in adding icon url in input field.

Query Tab :


In Query Tab , Publicly queryable field will decide Whether queries can be performed on the front end for the post type as part of Whether queries can be performed on the front end for the post type as part of parse_request().Custom query field is for Custom query variable.

Permalinks Tab :


In permalink tab, Permalink rewrite field is for handling of rewrites for this post type. URL Slug for customizing the permastruct slug. Pagination is the option for the permastruct should provide for pagination. Feeds is a option for whether the feed permastruct should be built for this post type

Capabilities Tab :


It is for an array of capabilities for this post type. After filling all this fields this tool will generate a code snippet which you have to paste it in your file, where you want to register custom post type.


Now you don’t have to write any function or go back to your previous code to copy function code, Because this tool will work for you. It allows you to generate WordPress code for any functionality quickly and easily. You change all settings and it spits out the code for you to copy and paste into your functions file.

While it is possible to create custom post types manually, that will require more than basic understanding of PHP. If you don’t have that expertise and simply don’t want to go through the hassle, you can use the custom post type plugins.

Custom Post Type UI plugin :

Custom Post Type UI is a very popular WordPress plugin for creating and managing custom post types. It has more than two hundred thousand active installs, Once you install and activate the plugin, it will create a new menu item titled ‘CPT UI’. In order to add new custom post type go to CPT UI > Add/Edit Post Types.

In that page, you will find basic options like the slug, singular and plural label, description, menu name, etc. Then, you can provide the text for various actions like Add New, Add New Item, Edit, View, Search, etc. From the ‘Supports’ section, you can choose which sections to include. Available options include Title, Editor, Comments, Author, Featured Image, Author, Revisions, etc.

 Custom Post Type UI plugin  Custom Post Type UI plugin

It is possible to add new taxonomies by going to the CPT UI > Add/Edit Taxonomies page. In this section you will find taxonomy options.  Like slug, Plural label, singular label, Attach to post type, Menu name etc. You can also import and export the post types to and from other websites.

 Custom Post Type UI plugin - taxonomy

After filling all those fields “Portfolio” custom post type will get added to menu,

 Custom Post Type UI plugin

Types WordPress plugin :

This one also has more than two hundred thousand active installs. This plugin allows you to create custom post types, custom taxonomies, and fields. Once you have installed and activated the plugin, you will find a list of all the post types in the Types > Post Types page. To add a new post type, click the ‘Add New Custom Post Type’ button. In the resulting page, you will find separate fields for customizing the post type.

Type Plugin Type Plugin

From the ‘Custom Post Properties’ section, you can choose to enable basic options like title, editor, comments, excerpt, featured image, etc. for the post type.  You can also add custom taxonomies in this plugin by going to the Types> Custom Taxonomies page.

Types Plugin- Taxonomy Types Plugin- Taxonomy

post-type-x :

Post Type X is a popular free WordPress plugin that allows you to manage and display your X catalog. Where x can be anything you want to catalog e.g.  products, services, portfolio. In this plugin Custom post types and Custom taxonomies are used for items and categories. Portfolio will be a custom post type for for your Portfolio catalog item and Item category will be a custom taxonomy for Portfolio Item.

After installing and activating this plugin you will see a new menu item in dashboard menu. From where you can add catalog Item, Item categories. Settings for that catalog Item.

Post-type-x plugin: Items

For example you want to create a catalog for portfolio Items, Goto Catalog >Add New Item , There you will find fields for your item label, short description, Long description and Item Image.

Post-type-x plugin: New Item

If you want set a category say  “Platform”, Then you can create an Item Category for that by Catalog > Item Category Menu. There you have to add Category name , Slug, description same as WordPress’s normal category.

After creating an Item and Item category you can customize them by adding setting. From setting you can set general settings in that you can manage Item as well as category setting, SEO Settings, Breadcrumbs settings etc. You can even add Catalog designs means how your catalog should display on front end. You can set Front-End Labels , Item listing labels etc.

Post-type-x Settings

Just like WooCommerce plugin categorized products you can also categorized your custom post types with the help of catalogs. On Front End your portfolio Item and Item Category will display like this,

Post-type-x Item

cpt-onomies :

CPT-onomies is a WordPress plugin that allows you to create, and use, taxonomies powered by your custom post types, using the post titles as the taxonomy terms. CPT-onomies includes a custom post type manager, allowing you to create custom post types and register CPT-onomies without touching one line of code!

A New submenu will display in settings menu, after installing and activating this plugin. In following images you can see different fields for adding custom post type.

cpt-onomies Plugin cpt-onomies Plugin

You just have to “Attach”, or register, your CPT-onomy to any post type and create relationships between your posts, just as you would create taxonomy relationships. Well you must have thought what is CPT-Onomy, A CPT-onomy is a Custom-Post-Type-powered taxonomy that functions just like a regular WordPress taxonomy, using your post titles as your taxonomy terms.

intuitive-custom-post-order :

This plugin intuitively, order items( Posts, Pages, and Custom Post Types, and Custom Taxonomies ) using a drag and drop sortable JavaScript. You just have to select sortable items from ‘Intuitive CPT’ menu of Setting menu in WordPress. For example you have many posts, pages or custom post types posts and you want to reorder the posts or pages or custom post types posts by just drag and drop. Then this plugin will help you.


Summary :

This is all about creating a custom post type, Creating custom taxonomies,  Meta boxes etc. Custom post types are really very important in WordPress. Using custom post type you can sort out your different contents in different buckets. There are different ways to create CPT. You can add functions for it or in a better way you can use WordPress tool or plugins for that purpose. This will be an very efficient way to create a custom post type.

Leave a Reply

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