{"id":38042,"date":"2022-06-01T15:00:12","date_gmt":"2022-06-01T13:00:12","guid":{"rendered":"https:\/\/qodeinteractive.com\/magazine\/?p=38042"},"modified":"2022-06-24T10:34:20","modified_gmt":"2022-06-24T08:34:20","slug":"how-to-add-taxonomies-to-custom-post-type","status":"publish","type":"post","link":"https:\/\/qodeinteractive.com\/magazine\/how-to-add-taxonomies-to-custom-post-type\/","title":{"rendered":"How to Add Taxonomies to a Custom Post Type in WordPress"},"content":{"rendered":"<div class=\"wpb-content-wrapper\" id=\"wpb-content-root\"><p>[vc_row][vc_column][vc_column_text]Most WordPress users have heard and worked with categories and tags, but might not be familiar with <a href=\"https:\/\/qodeinteractive.com\/magazine\/wordpress-taxonomy\/\">WordPress taxonomies<\/a>, as a more general term. However, since you create various types of content while working with a WordPress website, those taxonomies often come in handy as a means of backend data classification, as well as a means of organizing your website to better suit visitors. Thus, knowing how to manage and <strong>add taxonomies to custom post types<\/strong> can be essential for any WordPress webmaster, while being useful overall for any intermediate or advanced WordPress user.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]With that in mind, we have created this article, explaining more about taxonomies in general, including how to add them to a custom post type in WordPress. Since<strong> categories and tags are so well-known<\/strong>, in this article, we will focus more on explaining how to add a custom taxonomy to a custom post type, as a more suited way of classification and organization. Having said that, let us begin. Here\u2019s what we\u2019ll be talking about:[\/vc_column_text][vc_empty_space height=&#8221;22px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#why-add-taxonomies-to-custom-post-types\">Why Add Taxonomies to Custom Post Types in WordPress<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#how-to-add-taxonomies-to-custom-post-types\">How to Add Taxonomies to Custom Post Types in WordPress<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#additional-tips\">Additional Tips<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;80px&#8221;][vc_widget_sidebar sidebar_id=&#8221;new-top-picks-banner&#8221;][vc_empty_space height=&#8221;80px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\"><a id=\"why-add-taxonomies-to-custom-post-types\"><\/a>Why Add Taxonomies to Custom Post Types in WordPress<\/h2>\n<p>[\/vc_column_text][vc_column_text]As mentioned before, <strong>WordPress taxonomies serve to classify and organize website content<\/strong>. The two well-known taxonomies \u2013 categories and tags \u2013 are available in WordPress by default, but WordPress users often decide to use new ones that better suit the niche their website\u2019s content belongs to. In that case, custom taxonomies are often preceded by the creation of specific custom post types to which they best correlate.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]For example, if you are running a tour website, you might need to add destinations, book stores and movie websites require relevant genre taxonomies, music-related websites often need to add artists and record labels, real estate companies need to include specific amenities, while many other niches require category-like taxonomies. In general, these category-like taxonomies (meaning hierarchical) serve to<strong> group posts based on a given property<\/strong>, while tag-like taxonomies (meaning non-hierarchical) are used to <strong>describe all the properties a specific post has.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Therefore, both types of taxonomies are used on WordPress websites almost equally, as they efficiently organize the content, making it easy for visitors to navigate through and find the desired (custom) post quickly. That way, the visitor\u2019s experience is greatly improved, as they don\u2019t need to waste time needlessly searching for specific content, which will greatly influence the decision whether or not they would leave the website.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Furthermore, by adding relevant WordPress taxonomies, the content of your website will be better structured, making it more SEO optimized and easily indexable.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\"><a id=\"how-to-add-taxonomies-to-custom-post-types\"><\/a>How to Add Taxonomies to Custom Post Types in WordPress<\/h2>\n<p>[\/vc_column_text][vc_column_text]Having explained why <strong>you need custom post types<\/strong> with corresponding taxonomies, let us explore how you can create both a custom post type and taxonomy and add the taxonomy to that custom post type. As this an advanced subject, we will only go over the plugin method in this article. More precisely, we will be showcasing the <a href=\"https:\/\/wordpress.org\/plugins\/custom-post-type-ui\/\" target=\"_blank\" rel=\"noopener\">CPT UI<\/a> plugin, as one of the most well-known and easy-to-use plugins for creating and managing custom post types and taxonomies.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]That being said, before delving into the how-tos of this article, we must mention that we envisioned this article only as <strong>an introduction to the topic<\/strong>, making it accessible to a wide array of WordPress users. However, since we have already covered the topic of <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-make-wordpress-custom-post-types\/\">custom post types and custom taxonomies<\/a> in-depth in a separate article, we strongly suggest reading it after reading this article. It will help you broaden the knowledge gained by reading this one, especially on the \u201cbehind the scenes\u201d coding that goes into creating a custom post type and taxonomy. Having said that, let us begin.[\/vc_column_text][vc_empty_space height=&#8221;72px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\">Registering a Custom Post Type<\/h3>\n<p>[\/vc_column_text][vc_column_text]One of the few requirements for adding taxonomies to a WordPress website is <strong>having at least one post type<\/strong> to which it will be assigned. And, while you can always assign your taxonomy to one of the default post types (e.g. post or page), creating a specific custom post type is often more suitable. The same will be done in this article, where we will first explain how you can add a custom post type using the CPT UI plugin, to which we will later add a custom taxonomy.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]After <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-install-a-wordpress-plugin\/\">installing and activating the plugin<\/a>, <strong>navigate to the CPT UI &gt; Add\/Edit Post Types section<\/strong>. By default, you will only see a single tab called <strong>Add New Post Type<\/strong> there, unless you have already created or imported a custom post type using this plugin. So, <strong>to create a new custom post type, you only need to fill out the options found in this section<\/strong>. They are divided into three separate sections: Basic settings, Additional labels, and Settings. You will also see helpful explanations next to each of the options that will help you better understand the purpose of each one.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"546\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/CPT-UI-Add-Edit-Post-Types.jpg\" class=\"attachment-full size-full\" alt=\"CPT UI Add Edit Post Types\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/CPT-UI-Add-Edit-Post-Types.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/CPT-UI-Add-Edit-Post-Types-300x169.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/CPT-UI-Add-Edit-Post-Types-768x433.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/CPT-UI-Add-Edit-Post-Types-620x349.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Nevertheless, we will explain the process of creating a custom post type thoroughly below. For this article, <strong>as an example<\/strong>, we have decided to <strong>create a custom post type called project<\/strong> with a <strong>corresponding custom taxonomy called project category<\/strong> that will be assigned to it. Let us begin.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]First, we have <strong>added the post type slug, singular and plural label<\/strong>, as the three required options that need to be filled out. Then, while we can create the post type at this point by clicking the \u201cAdd Post Type\u201d button, we choose not to. We decided to go over the remaining options, so that we can change some of the default values they take according to our needs.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Specifically, we chose to auto-populate the remaining labels based on the singular and plural labels we already inserted. This was done by <strong>clicking the \u201cPopulate additional labels based on chosen labels\u201d link.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"700\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Creating-a-CPT-Basic-Settings.jpg\" class=\"attachment-full size-full\" alt=\"Creating a-CPT Basic Settings\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Creating-a-CPT-Basic-Settings.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Creating-a-CPT-Basic-Settings-300x217.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Creating-a-CPT-Basic-Settings-768x555.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Creating-a-CPT-Basic-Settings-620x448.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Having done that, all the additional labels except the post type description have been created. Then, we had the choice of whether to insert a post type description, even though it won\u2019t be shown on the website\u2019s frontend unless specified otherwise using code. For this article, we choose to insert a dummy description.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"483\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Creating-a-CPT-Additional-Labels.jpg\" class=\"attachment-full size-full\" alt=\"Creating a CPT Additional Labels\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Creating-a-CPT-Additional-Labels.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Creating-a-CPT-Additional-Labels-300x150.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Creating-a-CPT-Additional-Labels-768x383.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Creating-a-CPT-Additional-Labels-620x309.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Afterward, we <strong>proceed to the Settings section<\/strong>, which represents the main part of the custom post type creation process. In this section, you can set up all the options and features a custom post type can have, much of those being advanced options. Nevertheless, thanks to the descriptions left next to each option, most WordPress users should have no issues understanding what the options are and how to set them properly. And, for those curious, we advise consulting the documentation for the <a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/register_post_type\/\" target=\"_blank\" rel=\"noopener\">register_post_type()<\/a> function, which is the underlying function whose parameters are being set within this section.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"700\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Creating-a-CPT-Settings.jpg\" class=\"attachment-full size-full\" alt=\"Creating a CPT Settings\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Creating-a-CPT-Settings.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Creating-a-CPT-Settings-300x217.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Creating-a-CPT-Settings-768x555.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Creating-a-CPT-Settings-620x448.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Having done that, let us go over the options we used for our example custom post type. Since for most of the options we used default values, we will only highlight the ones that we choose to alter or fill out. First of all, <strong>we have set the \u201cHas Archive\u201d option to true<\/strong> but decided <strong>not to include a custom slug that would form the URL of the project archive page<\/strong>. By doing so, we have made it so that our custom post type would have an archive, which would <strong>use the default URL<\/strong>, i.e. website-url\/project instead of some custom permalink ending.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"585\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Has-Archive-True.jpg\" class=\"attachment-full size-full\" alt=\"Has Archive True\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Has-Archive-True.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Has-Archive-True-300x181.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Has-Archive-True-768x464.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Has-Archive-True-620x374.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Following that,<strong> we have set the menu position to 10 and chosen the dashicons-portfolio icon as the one associated with our custom post type side menu section<\/strong>. The reason for the former is that we wanted the custom post type menu section to come after the Media section, as well as after the custom post type sections belonging to the <a href=\"https:\/\/qodeinteractive.com\/wordpress-theme\/lekker-portfolio-wordpress-theme\/\" target=\"_blank\" rel=\"noopener\">Lekker theme<\/a> we were using. As for the icon, we thought it best not to use the default posts icon, and the portfolio one seemed the most fitting in our case.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Choose-Dashicon.jpg\" class=\"attachment-full size-full\" alt=\"Choose Dashicon\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Choose-Dashicon.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Choose-Dashicon-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Choose-Dashicon-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Choose-Dashicon-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Finally, <strong>we decided to allow all possible post type<\/strong> features instead of the default three: title, editor and featured image. As for the custom features option, we didn\u2019t use it in this example, as it is reserved as means of interaction with a very niche set of plugins and\/or themes. Additionally, we also chose not to assign any of the existing taxonomies to our new custom post type, preferring to do so using the subsequent sections. Then, to finish the process of creating a custom post type, we <strong>clicked the \u201cAdd Post Type\u201d button<\/strong> at the bottom.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Supports.jpg\" class=\"attachment-full size-full\" alt=\"Supports\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Supports.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Supports-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Supports-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Supports-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;60px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Add-Post-Type.jpg\" class=\"attachment-full size-full\" alt=\"Add Post Type\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Add-Post-Type.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Add-Post-Type-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Add-Post-Type-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Add-Post-Type-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]While we have concluded the first part of our example, there are still some things worth mentioning.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Firstly, as seen on the screenshot above, while you are registering the custom post type, <strong>you will see a list of available taxonomies<\/strong> which you can assign to your custom post type. Therefore, <strong>this is the first instance in which you can add a taxonomy to a custom post type<\/strong>, regardless of whether it is a default or custom taxonomy. The two default WordPress taxonomies \u2013 categories and tags \u2013 will be shown alongside a <em>WP Core<\/em> label so that you don\u2019t confuse them with a custom taxonomy that might share a label or one of its parts.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]After that, you will see all the custom taxonomies enabled by the plugins on your website. In our case, those were the taxonomies that are part of the <a href=\"https:\/\/lekker.qodeinteractive.com\/\" target=\"_blank\" rel=\"noopener\">Lekker<\/a> theme, as well as the ones that come with the <a href=\"https:\/\/wordpress.org\/plugins\/woocommerce\/\" target=\"_blank\" rel=\"noopener\">WooCommerce<\/a> plugin we also had installed on the website. The reason why we choose not to use this option is simply due to not having created a custom taxonomy that is fit to be added to our custom post type yet. However, you are free to <strong>assign any of your existing taxonomies to your custom post type<\/strong> at this point, should you decide to do so.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Additionally, we will describe what was achieved after creating the project post type in the manner described above. Of course, this includes creating a menu section called <em>My Projects<\/em> in the desired location with the desired menu icon next to it.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/My-Projects.jpg\" class=\"attachment-full size-full\" alt=\"My Projects\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/My-Projects.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/My-Projects-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/My-Projects-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/My-Projects-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]And, if we wanted to create a project single item by navigating to <strong>My Projects &gt; Add new<\/strong>, we could do so using all the features we enabled previously.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"597\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/My-Projects-Add-New.jpg\" class=\"attachment-full size-full\" alt=\"My Projects Add New\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/My-Projects-Add-New.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/My-Projects-Add-New-300x185.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/My-Projects-Add-New-768x473.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/My-Projects-Add-New-620x382.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;60px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/My-Projects-Add-New-2.jpg\" class=\"attachment-full size-full\" alt=\"My Projects Add New\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/My-Projects-Add-New-2.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/My-Projects-Add-New-2-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/My-Projects-Add-New-2-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/My-Projects-Add-New-2-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]That said, let us explain how you can register a custom taxonomy, which is the step before adding it to this custom post type.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;72px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\">Registering a Custom Taxonomy<\/h3>\n<p>[\/vc_column_text][vc_column_text]To register a custom taxonomy with the CPT UI plugin,<strong> navigate to the CPT UI &gt; Add\/Edit Taxonomies section<\/strong>. Having done that, you should only see a single tab called \u201cAdd New Taxonomy\u201d, unless you have already created or imported a taxonomy using this plugin. But, assuming that you haven\u2019t, you should know that <strong>creating a custom taxonomy only requires you to fill out the options<\/strong> found in this tab, and <strong>click the \u201cAdd Taxonomy\u201d button<\/strong>. The options are once again divided into the same three sections and are properly explained by corresponding descriptions.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"660\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Add-Edit-Taxonomies.jpg\" class=\"attachment-full size-full\" alt=\"Add Edit Taxonomies\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Add-Edit-Taxonomies.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Add-Edit-Taxonomies-300x204.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Add-Edit-Taxonomies-768x523.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Add-Edit-Taxonomies-620x422.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Nevertheless, we will go over the process of creating a custom taxonomy using the example we prepared for this article that involves a custom taxonomy we called project category. Let us begin.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]First, we <strong>added the taxonomy slug, the two mandatory labels, and auto-populated the remaining labels by clicking the \u201cPopulate additional labels based on the chosen labels\u201d link<\/strong>. Then, <strong>we needed to add the taxonomy to an existing post type<\/strong>. Of course, this is the second time at which we could correlate a given post type and taxonomy. And, even though it was optional in the previous step,<strong> it is necessary to associate a custom taxonomy with a given custom post type<\/strong> (or a set of custom post types) <strong>from the list at this point<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]The list that will be presented to you will contain all the publicly available post types, regardless of whether they are default post types or custom ones. What <em>publicly available<\/em> means is that the <strong>public<\/strong> argument of the <strong>register_post_type()<\/strong> function is set to true, either in code or through the CPT UI interface, for the custom post types registered with this plugin. Similar to the previous section, you will see a list of default post types that contain the WP Core label, followed by the post types created by your plugins or theme. In our case, this included post types created using the <a href=\"https:\/\/wordpress.org\/plugins\/elementor\/\" target=\"_blank\" rel=\"noopener\">Elementor<\/a> and WooCommerce plugins present on our test website.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]That being said, we added the project category taxonomy to our previously created project post type and proceeded below to fill out the remaining options before registering the taxonomy completely.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"700\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Taxonomy-Basic-Settings.jpg\" class=\"attachment-full size-full\" alt=\"Taxonomy Basic Settings\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Taxonomy-Basic-Settings.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Taxonomy-Basic-Settings-300x217.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Taxonomy-Basic-Settings-768x555.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Taxonomy-Basic-Settings-620x448.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Similar to the previous step, after auto-populating the labels, we can add the taxonomy description, should we decide to use it in code later.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Taxonomy-Additional-Labels.jpg\" class=\"attachment-full size-full\" alt=\"Taxonomy Additional Labels\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Taxonomy-Additional-Labels.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Taxonomy-Additional-Labels-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Taxonomy-Additional-Labels-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Taxonomy-Additional-Labels-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Then, after adding a simple description, <strong>we proceed to the Settings section<\/strong>, where all the important options are. Once again, most of these options are properly explained, but should you wish to know more, we advise consulting the documentation for the <a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/register_taxonomy\/\" target=\"_blank\" rel=\"noopener\">register_taxonomy()<\/a> function. It is, in fact, this function whose arguments are being set using the Settings section.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]That being said, let&#8217;s explore the options we used for our example. Since most were using the default values, we will cover only those we purposefully altered while registering the project category taxonomy. As it is only natural to have project categories and subcategories, we made our custom taxonomy hierarchical, allowing for such a parent-child relationship.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Hierarchical-True.jpg\" class=\"attachment-full size-full\" alt=\"Hierarchical True\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Hierarchical-True.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Hierarchical-True-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Hierarchical-True-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Hierarchical-True-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]And, apart from that, we enabled the remaining two options shown on the screenshot below simply out of convenience. The first creates a taxonomy admin column that appears on the list of all post items to which this taxonomy is added. This admin column serves to make the filtering of those post type items easier, while in the corresponding menu section. In our particular case, it means that, while positioned within the <strong>My Projects &gt; All Projects<\/strong> section, we could filter our projects based on the project category that is assigned to them, using the Project Categories admin column that we added.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Project-Categories.jpg\" class=\"attachment-full size-full\" alt=\"Project Categories\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Project-Categories.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Project-Categories-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Project-Categories-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Project-Categories-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]The second option is self-explanatory and allows us to assign project categories to specific projects or in bulk using the quick\/bulk edit panel.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Quick-Edit-Project-Categories.jpg\" class=\"attachment-full size-full\" alt=\"Quick Edit Project Categories\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Quick-Edit-Project-Categories.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Quick-Edit-Project-Categories-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Quick-Edit-Project-Categories-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Quick-Edit-Project-Categories-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]After choosing all the options we needed, we <strong>clicked the \u201cAdd Taxonomy\u201d button<\/strong> to register our custom project category taxonomy.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"700\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Add-Taxonomy.jpg\" class=\"attachment-full size-full\" alt=\"Add Taxonomy\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Add-Taxonomy.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Add-Taxonomy-300x217.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Add-Taxonomy-768x555.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Add-Taxonomy-620x448.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]As a result of the options we chose, it was added to the My Projects menu section. Then, <strong>by navigating to My Projects &gt; Project Categories<\/strong>, we can <strong>inspect existing project category items and add new ones<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/My-Projects-Project-Categories.jpg\" class=\"attachment-full size-full\" alt=\"My Projects Project Categories\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/My-Projects-Project-Categories.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/My-Projects-Project-Categories-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/My-Projects-Project-Categories-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/My-Projects-Project-Categories-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;60px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Project-Categories-Backend.jpg\" class=\"attachment-full size-full\" alt=\"Project Categories Backend\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Project-Categories-Backend.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Project-Categories-Backend-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Project-Categories-Backend-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Project-Categories-Backend-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;82px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\">Editing the Custom Post Type\/Taxonomy Options and Adding the Taxonomy to a Custom Post Type<\/h3>\n<p>[\/vc_column_text][vc_column_text]It is important to know that, even if you register a custom post type and taxonomy in a manner described in the first two subsections of this section, you can still change the options you selected, if you need to. That way, you don\u2019t have to feel pressured to fill out all the options without fully understanding their purpose. Instead, you can fill out only the required set of options and register a custom post type or taxonomy first.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Then, after thoroughly inspecting the options using the corresponding documentation links we supplied, you can edit the custom post type or taxonomy and set the remaining options accordingly. Of course, in the case you have already set all the corresponding options according to your needs both for a custom post type and taxonomy, and don\u2019t feel that you need to edit anything, then you can simply disregard this section of the article and proceed to the following one.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]To edit the properties of a registered post type, <strong>navigate to the CPT UI &gt; Add\/Edit Post Types section<\/strong>. As long as you have registered at least one custom post type, you will see all the four tabs the CPT UI plugin offers. Then, <strong>select your custom post type from the dropdown menu at the top<\/strong> and <strong>alter the options as you see fit.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Most importantly, should you decide to unassign an existing taxonomy from a custom post type and\/or assign a new one, you can also do it in this tab, as long as you have selected the correct custom post type to edit. Then, by navigating to the bottom of the Settings subsection, you can proceed to adjust which of the existing taxonomies will be added to your custom post type. Finally, to finish your editing process, don\u2019t forget to <strong>click the \u201cSave Post Type\u201d button.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"543\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Edit-Post-Types.jpg\" class=\"attachment-full size-full\" alt=\"Edit Post Types\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Edit-Post-Types.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Edit-Post-Types-300x168.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Edit-Post-Types-768x430.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Edit-Post-Types-620x347.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;60px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"600\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Taxonomies-Save-Post-Type.jpg\" class=\"attachment-full size-full\" alt=\"Taxonomies Save Post Type\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Taxonomies-Save-Post-Type.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Taxonomies-Save-Post-Type-300x186.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Taxonomies-Save-Post-Type-768x476.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Taxonomies-Save-Post-Type-620x384.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Similarly, if you want to edit the properties of any custom taxonomy registered with the CPT UI plugin, navigate to the CPT UI &gt; Add\/Edit Taxonomies section, select the Edit Taxonomies tab, as well as the correct custom taxonomy whose properties you wish to edit.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Most importantly, should you decide to change the custom post type or set of custom post types to which your custom taxonomy is added, you should do so using the Attach to Post Type option, found in the Basic settings subsection. Then, <strong>having done the necessary edits, don\u2019t forget to click the \u201cSave Taxonomy\u201d button.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"552\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Edit-Taxonomies.jpg\" class=\"attachment-full size-full\" alt=\"Edit Taxonomies\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Edit-Taxonomies.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Edit-Taxonomies-300x171.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Edit-Taxonomies-768x437.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Edit-Taxonomies-620x353.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;60px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"504\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Choose-and-Save-Taxonomy.jpg\" class=\"attachment-full size-full\" alt=\"Choose and Save Taxonomy\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Choose-and-Save-Taxonomy.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Choose-and-Save-Taxonomy-300x156.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Choose-and-Save-Taxonomy-768x399.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Choose-and-Save-Taxonomy-620x322.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;82px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\">Assigning Taxonomy Items to Custom Posts<\/h3>\n<p>[\/vc_column_text][vc_column_text]The last remaining steps in this tutorial are about <strong>creating a custom post and custom taxonomy item<\/strong>, and assigning the latter to the former. Luckily, all of this can be performed on the custom post editing screen.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Therefore, to assign a taxonomy item to a corresponding post item, you only need to <strong>create a new custom post item or edit an existing one and find the corresponding taxonomy meta box<\/strong>. In the case of default taxonomies tied to a blog post, these meta boxes would be called Categories and Tags, respectively.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Posts-All-Posts.jpg\" class=\"attachment-full size-full\" alt=\"Posts All Posts\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Posts-All-Posts.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Posts-All-Posts-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Posts-All-Posts-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Posts-All-Posts-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;60px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"558\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Categories-and-Tags.jpg\" class=\"attachment-full size-full\" alt=\"Categories and Tags\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Categories-and-Tags.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Categories-and-Tags-300x173.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Categories-and-Tags-768x442.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Categories-and-Tags-620x357.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Of course, in the case of custom posts and custom taxonomies, the names of those meta boxes vary based on the labels you used in the registration process we talked about above.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]For our \u201cproject\u201d custom post type with the \u201cproject category\u201d as the added custom taxonomy, it meant opening an existing project item (or creating a new one) and finding the Project Categories meta box. There, we could<strong> tick the checkbox next to existing project category items<\/strong> previously created, followed by a <strong>click on the \u201cUpdate\u201d button<\/strong>, to save the edit we made.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"527\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Project-Categories-Update.jpg\" class=\"attachment-full size-full\" alt=\"Project Categories Update\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Project-Categories-Update.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Project-Categories-Update-300x163.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Project-Categories-Update-768x418.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Project-Categories-Update-620x337.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]On the other hand, if we haven\u2019t created any project categories previously or wanted to create new ones, we could still do so <strong>using the options found in the same meta box<\/strong>. More precisely, after <strong>clicking on the \u201cAdd new Project Category\u201d link<\/strong>, a set of options should appear below the link. With them, we could <strong>specify the name of the new project category item, and its corresponding parent category item<\/strong>, since we have made the project category taxonomy hierarchical while registering it. Then, by <strong>clicking the \u201cAdd new Project Category\u201d button<\/strong> found below, followed by the<strong> \u201cUpdate\u201d button<\/strong>, we would successfully create that taxonomy item and assign it to a given project item, i.e. custom post.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"648\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Add-New-Project-Category.jpg\" class=\"attachment-full size-full\" alt=\"Add New Project Category\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Add-New-Project-Category.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Add-New-Project-Category-300x201.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Add-New-Project-Category-768x514.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Add-New-Project-Category-620x415.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Needless to say, we could have also used the <strong>My Projects &gt; Project Categories &gt; Add new Project Category<\/strong> section to add a new category before assigning it in the manner described in the first part of this section. In which case we would also <strong>add a project category name<\/strong>, a parent project category, if needed, and <strong>click the \u201cAdd new Project Category\u201d button<\/strong> found below.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"630\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/New-Project-Category.jpg\" class=\"attachment-full size-full\" alt=\"New Project Category\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/New-Project-Category.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/New-Project-Category-300x195.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/New-Project-Category-768x499.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/New-Project-Category-620x403.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;78px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\"><a id=\"additional-tips\"><\/a>Additional Tips<\/h2>\n<p>[\/vc_column_text][vc_column_text]While we have already covered the main topic of this article, we felt that there are still some things that need to be said before concluding it. For this reason, we have created this last section explaining some things you should consider while and after adding a taxonomy to a custom post type.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Firstly, if when adding a custom taxonomy to a custom post type, multiple taxonomies share a common label, it is important to know how you can <strong>discern which exact custom taxonomy you are adding to a given post type<\/strong>. As an example, we have purposefully included a screenshot showcasing four custom taxonomies all sharing the same \u201cCategories\u201d label.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]To establish what those categories are exactly, we only need to investigate the previous list of taxonomies using the developer tools of our current browser. As such, we will<strong> right-click on one of the \u201cCategories\u201d labels and click on the \u201cInspect\u201d link<\/strong> that appears afterward.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"468\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Inspect-Taxonomies.jpg\" class=\"attachment-full size-full\" alt=\"Inspect Taxonomies\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Inspect-Taxonomies.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Inspect-Taxonomies-300x145.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Inspect-Taxonomies-768x371.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Inspect-Taxonomies-620x299.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]This will open the browser\u2019s developer tools, placing us within the Elements tab and exactly on the HTML element we right-clicked on. In our case, it was the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Element\/label\" target=\"_blank\" rel=\"noopener\">&lt;label&gt;<\/a> HTML element. Then, <strong>we can figure out what that category is by either inspecting its \u201cfor&#8221; attribute or the \u201cvalue\u201d attribute of the input HMTL element that is shown before it<\/strong>. Looking at the screenshot below, we can see that the first category was a taxonomy called clients category, whose slug is <em>clients-category<\/em>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"696\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Inspect-Categories.jpg\" class=\"attachment-full size-full\" alt=\"Inspect Categories\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Inspect-Categories.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Inspect-Categories-300x215.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Inspect-Categories-768x552.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Inspect-Categories-620x445.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Repeating the same steps for the remaining labels, we were able to figure out that the corresponding custom taxonomies were the clients, portfolio, team, and testimonials category, respectively.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"700\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Inspect-Categories-x4.jpg\" class=\"attachment-full size-full\" alt=\"Inspect Categories\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Inspect-Categories-x4.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Inspect-Categories-x4-300x217.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Inspect-Categories-x4-768x555.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/06\/Inspect-Categories-x4-620x448.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]And, while we decided not to assign any of those taxonomies to our project custom post type, we thought it best to share how such a situation can be resolved, should a similar one occur on your end.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]That being said, this concludes our overview on the registering process of custom post type and taxonomies and how to assign later to the former using the CPT UI plugin. However, we must mention that there are still a lot of things which need to be done to display the custom post types and their taxonomies on your website. This includes creating a specific custom post type single page, archive page, and custom taxonomy archive page and to configure its design in an intuitive manner that favors the most WordPress users.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Sadly, as these things require considerable coding knowledge, they are often part of premium WordPress plugins. But, should any intermediate or advanced WordPress user decide to delve into the coding aspect of these topics, we strongly suggest reading the series of articles on the movie custom post type and movie genre custom taxonomy we created. Of course, we are referring to the aforementioned article on the creation of custom post types and taxonomies, as well as on subsequent articles on <a href=\"https:\/\/qodeinteractive.com\/magazine\/create-wordpress-custom-post-type-archive\/\">the creation of custom post archives<\/a> and <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-create-custom-wordpress-archive-page\/\">custom taxonomy archives<\/a>. With that final note, we conclude the article.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">Final Thoughts<\/h2>\n<p>[\/vc_column_text][vc_column_text]In this article, we talked about all the steps required to add a taxonomy to a custom post type in WordPress. While most of our article revolved around a custom post type and custom taxonomy we specifically created, we made sure to carefully outline all the necessary steps, so that you can successfully add any taxonomy to any available post type, should you decide to do so. To reiterate, this meant registering the post type and taxonomy, in the case they are custom, making the correlation between the two, as well as creating post items and taxonomy terms and assigning them so that they abide by the established correlation.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]While this may seem overwhelmingly difficult by using code alone, we have covered the process using the CPT UI plugin, making it significantly easier to understand. Thus, we are certain you will have no issues adding any taxonomies to your custom post types by following the advice we outlined. Finally, we advise bookmarking this article for future use, should you need the reminder the next time you are managing your custom posts and\/or taxonomies.<br \/>\n[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Add taxonomies to custom post type and make it easier for your visitors to find what they are looking for. We will show you how it&#8217;s done.<\/p>\n","protected":false},"author":11229,"featured_media":38096,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[268,4,13],"class_list":["post-38042","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-resources","tag-taxonomies","tag-tips","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/38042","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/users\/11229"}],"replies":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/comments?post=38042"}],"version-history":[{"count":0,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/38042\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media\/38096"}],"wp:attachment":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media?parent=38042"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/categories?post=38042"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/tags?post=38042"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}