{"id":14105,"date":"2019-01-20T09:41:09","date_gmt":"2019-01-20T09:41:09","guid":{"rendered":"https:\/\/www.hostinger.com\/tutorials\/?p=14105"},"modified":"2025-04-09T15:46:56","modified_gmt":"2025-04-09T15:46:56","slug":"wordpress-taxonomy","status":"publish","type":"post","link":"\/uk\/tutorials\/wordpress-taxonomy\/","title":{"rendered":"WordPress taxonomy: What it is, and how to create custom taxonomies"},"content":{"rendered":"<p><span style=\"font-weight: 400\">WordPress Codex defines taxonomy as a grouping mechanism for all of your content. In short, it allows you to group your posts based on shared characteristics. <\/span><\/p><p><span style=\"font-weight: 400\">Let&rsquo;s say that you have a website about movies. Chances are you want to group the movies based on genre. Taxonomies allow you to do just that, thus helping users to navigate your site.<\/span><\/p><p>Although the term &ldquo;Taxonomy&rdquo; does come from biology, i<span style=\"font-weight: 400\">n this article, we will explain what WordPress Taxonomy is, what Custom Taxonomies are, and how to create them.<\/span><\/p><p class=\"has-text-align-center\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/Mega-WordPress-Cheat-EN.pdf\" target=\"_blank\" rel=\"noopener\">Download all in one WordPress cheat sheet<\/a><\/p><p>\n\n\n\n\n\n<div class=\"protip\"><div class=\"protip__heading\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                    <path d=\"M1.49234 23.5024C1.23229 23.5024 0.972242 23.4024 0.782206 23.2123C0.562165 22.9923 0.452144 22.6822 0.502153 22.3722C0.562165 21.9221 1.14227 17.9113 3.00262 16.351C3.63274 15.8209 4.43289 15.5509 5.26305 15.5609C6.09321 15.5909 6.87335 15.9109 7.47347 16.4911C8.6937 17.6913 8.76371 19.6717 7.6435 20.9919C6.0832 22.8523 2.08245 23.4324 1.63237 23.4924C1.59236 23.4924 1.54235 23.4924 1.50234 23.4924L1.49234 23.5024ZM5.16303 17.5613C4.84297 17.5613 4.53291 17.6713 4.29287 17.8813C3.60274 18.4614 3.07264 19.9317 2.75258 21.242C4.06282 20.9219 5.5331 20.3918 6.11321 19.7017C6.55329 19.1716 6.54329 18.3814 6.0832 17.9213C5.85316 17.7013 5.5431 17.5713 5.20304 17.5613C5.19304 17.5613 5.17303 17.5613 5.16303 17.5613ZM11.7243 21.8821C11.4942 21.8821 11.2642 21.8021 11.0841 21.652C10.8541 21.462 10.7241 21.1819 10.7241 20.8819V15.9109L8.08358 13.2705H3.11264C2.81259 13.2705 2.53254 13.1404 2.3425 12.9104C2.15246 12.6803 2.07245 12.3803 2.12246 12.0902C2.19247 11.7102 2.84259 8.36953 4.70294 7.12929C6.33325 6.04909 8.96375 6.49918 10.244 6.80923C11.5442 4.96889 13.2546 3.4286 15.2349 2.33839C17.4553 1.11816 19.9858 0.518051 22.4963 0.498047C23.0464 0.498047 23.4865 0.948132 23.4865 1.49824C23.4865 5.0389 22.3763 9.97983 17.1753 13.7605C17.4853 15.0408 17.9354 17.6613 16.8552 19.2816C15.615 21.1419 12.2744 21.7921 11.8943 21.8621C11.8343 21.8721 11.7743 21.8821 11.7143 21.8821H11.7243ZM12.7245 16.181V19.6016C13.7146 19.2916 14.7948 18.7915 15.2049 18.1814C15.675 17.4812 15.605 16.091 15.385 14.9008C14.5248 15.3808 13.6346 15.8109 12.7245 16.181ZM9.66388 12.0302L11.9643 14.3307C13.1845 13.8306 14.3648 13.2204 15.485 12.5103C19.9358 9.51974 21.2361 5.60901 21.4561 2.53843C19.6157 2.67846 17.8254 3.20856 16.2051 4.09872C14.2847 5.14892 12.6544 6.68921 11.4942 8.54956C10.7841 9.65977 10.174 10.82 9.66388 12.0302ZM4.39289 11.2701H7.81353C8.1936 10.3599 8.63368 9.46974 9.11377 8.60957C7.92355 8.38953 6.51329 8.31952 5.81315 8.78961C5.19304 9.19968 4.70294 10.3099 4.39289 11.2701Z\" fill=\"#673DE6\"\/>\n                <\/svg>\n                <p class=\"protip__title\">\n                   What Is WordPress Taxonomy?\n                <\/p>\n            <\/div>\n            <p class=\"protip__content\"> WordPress Taxonomy is a way of grouping and organizing content types into categories and tags, making it easier for users to navigate a website. Taxonomies in WordPress include categories, tags, and custom taxonomies, which can be customized to meet specific website needs.<\/p><\/div>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-types-of-wordpress-taxonomies\">Types of WordPress taxonomies<\/h2><p><span style=\"font-weight: 400\">In total, there are four taxonomies in <a href=\"\/uk\/tutorials\/what-is-wordpress\/\">WordPress<\/a> that you can use to group your posts.<\/span> <span style=\"font-weight: 400\">Let&rsquo;s take a look at each one.<\/span><\/p><h3 class=\"wp-block-heading\" id=\"h-1-category\"><b>1. Category<\/b><\/h3><p>The category taxonomy in WordPress lets you group your post into hierarchical categories. There are two different ways to group your posts via Categories.<\/p><p><span style=\"font-weight: 400\">The first way is to log in to your Dashboard and head to <\/span><b>Posts<\/b><span style=\"font-weight: 400\">&nbsp;-&gt; <\/span><b>Categories<\/b><span style=\"font-weight: 400\">. There, you can define your categories, as well as add in the <a href=\"\/uk\/tutorials\/what-is-a-wordpress-slug\/\">WordPress slug<\/a> and define child categories. &nbsp;<\/span><\/p><div class=\"wp-block-image wp-image-14188 size-full\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"580\" height=\"559\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/01\/adding-categories-wordpress-plugin.jpg\/public\" alt=\"adding categories from posts menu\" class=\"wp-image-14188\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/adding-categories-wordpress-plugin.jpg 580w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/adding-categories-wordpress-plugin-150x145.jpg 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/adding-categories-wordpress-plugin-300x289.jpg 300w\" sizes=\"(max-width: 580px) 100vw, 580px\" \/><figcaption class=\"wp-element-caption\">Adding categories and setting the parent-child relation.<\/figcaption><\/figure>\n<\/div><p><span style=\"font-weight: 400\">The second option is to head to <\/span><b>Posts<\/b><span style=\"font-weight: 400\">&nbsp;-&gt; <\/span><b>Add New<\/b><span style=\"font-weight: 400\">. You can add multiple categories directly from the panel next to your visual editor. While it is the easier option, it doesn&rsquo;t let you define the slug and description.<\/span><\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"277\" height=\"330\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/01\/categories-visual-editor-wordpress-taxonomy.jpg\/public\" alt=\"adding categories from the visual editor\" class=\"wp-image-14189\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/categories-visual-editor-wordpress-taxonomy.jpg 277w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/categories-visual-editor-wordpress-taxonomy-126x150.jpg 126w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/categories-visual-editor-wordpress-taxonomy-252x300.jpg 252w\" sizes=\"(max-width: 277px) 100vw, 277px\" \/><\/figure>\n<\/div><h3 class=\"wp-block-heading\" id=\"h-2-tag\"><b>2. Tag<\/b><\/h3><p><span style=\"font-weight: 400\">Tags are similar to categories &ndash; it groups your posts. However, a <a href=\"\/uk\/tutorials\/difference-between-wordpress-categories-and-tags\/\">tag is different from a category<\/a> as it doesn&rsquo;t have a hierarchical structure.<\/span><\/p><p><span style=\"font-weight: 400\">A tag is a single parameter that puts your similar posts together, but it focuses on smaller details of your content, rather than overall themes.<\/span><\/p><p><span style=\"font-weight: 400\">Let&rsquo;s say that you want to create genres and subgenres for your movie WordPress site. You can do that by using category like taxonomy, as it supports hierarchical structure. If you want to group movies of any genre with Brad Pitt as the main star, you can add tags.<\/span><\/p><p><span style=\"font-weight: 400\">Creating <a href=\"\/uk\/tutorials\/wordpress-tags\/\">WordPress tags<\/a> is similar to creating categories. You can do it either from <\/span><b>Posts<\/b><span style=\"font-weight: 400\">&nbsp;-&gt; <\/span><b>Tags <\/b><span style=\"font-weight: 400\">or panel next to the visual editor. Slug and description can also be defined.<\/span><\/p><div class=\"wp-block-image size-full wp-image-14190\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"277\" height=\"257\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/01\/tags-visual-editor-wordpress-taxonomy.jpg\/public\" alt=\"adding tags from the visual editor\" class=\"wp-image-14190\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/tags-visual-editor-wordpress-taxonomy.jpg 277w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/tags-visual-editor-wordpress-taxonomy-150x139.jpg 150w\" sizes=\"(max-width: 277px) 100vw, 277px\" \/><figcaption class=\"wp-element-caption\">Adding tags from the visual editor<\/figcaption><\/figure>\n<\/div><p><span style=\"font-weight: 400\"><\/span><\/p><p>\n\n\n        <div class=\"protip\">\n            <div class=\"protip__heading\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                    <path d=\"M1.49234 23.5024C1.23229 23.5024 0.972242 23.4024 0.782206 23.2123C0.562165 22.9923 0.452144 22.6822 0.502153 22.3722C0.562165 21.9221 1.14227 17.9113 3.00262 16.351C3.63274 15.8209 4.43289 15.5509 5.26305 15.5609C6.09321 15.5909 6.87335 15.9109 7.47347 16.4911C8.6937 17.6913 8.76371 19.6717 7.6435 20.9919C6.0832 22.8523 2.08245 23.4324 1.63237 23.4924C1.59236 23.4924 1.54235 23.4924 1.50234 23.4924L1.49234 23.5024ZM5.16303 17.5613C4.84297 17.5613 4.53291 17.6713 4.29287 17.8813C3.60274 18.4614 3.07264 19.9317 2.75258 21.242C4.06282 20.9219 5.5331 20.3918 6.11321 19.7017C6.55329 19.1716 6.54329 18.3814 6.0832 17.9213C5.85316 17.7013 5.5431 17.5713 5.20304 17.5613C5.19304 17.5613 5.17303 17.5613 5.16303 17.5613ZM11.7243 21.8821C11.4942 21.8821 11.2642 21.8021 11.0841 21.652C10.8541 21.462 10.7241 21.1819 10.7241 20.8819V15.9109L8.08358 13.2705H3.11264C2.81259 13.2705 2.53254 13.1404 2.3425 12.9104C2.15246 12.6803 2.07245 12.3803 2.12246 12.0902C2.19247 11.7102 2.84259 8.36953 4.70294 7.12929C6.33325 6.04909 8.96375 6.49918 10.244 6.80923C11.5442 4.96889 13.2546 3.4286 15.2349 2.33839C17.4553 1.11816 19.9858 0.518051 22.4963 0.498047C23.0464 0.498047 23.4865 0.948132 23.4865 1.49824C23.4865 5.0389 22.3763 9.97983 17.1753 13.7605C17.4853 15.0408 17.9354 17.6613 16.8552 19.2816C15.615 21.1419 12.2744 21.7921 11.8943 21.8621C11.8343 21.8721 11.7743 21.8821 11.7143 21.8821H11.7243ZM12.7245 16.181V19.6016C13.7146 19.2916 14.7948 18.7915 15.2049 18.1814C15.675 17.4812 15.605 16.091 15.385 14.9008C14.5248 15.3808 13.6346 15.8109 12.7245 16.181ZM9.66388 12.0302L11.9643 14.3307C13.1845 13.8306 14.3648 13.2204 15.485 12.5103C19.9358 9.51974 21.2361 5.60901 21.4561 2.53843C19.6157 2.67846 17.8254 3.20856 16.2051 4.09872C14.2847 5.14892 12.6544 6.68921 11.4942 8.54956C10.7841 9.65977 10.174 10.82 9.66388 12.0302ZM4.39289 11.2701H7.81353C8.1936 10.3599 8.63368 9.46974 9.11377 8.60957C7.92355 8.38953 6.51329 8.31952 5.81315 8.78961C5.19304 9.19968 4.70294 10.3099 4.39289 11.2701Z\" fill=\"#673DE6\"\/>\n                <\/svg>\n                <p class=\"protip__title\">\n                    Pro Tip                <\/p>\n            <\/div>\n            <p class=\"protip__content\">While tags are optional, categories are mandatory for your posts. Every post needs at least one category. By default, WordPress will automatically put your post under &ldquo;Uncategorized&rdquo; category.<\/p>\n                    <\/div>\n        \n\n\n\n<\/p><p><span style=\"font-weight: 400\">The other 2 taxonomies are not visible to visitors. Although rarely used, they are still worth mentioning.<\/span><\/p><h3 class=\"wp-block-heading\" id=\"h-3-link-category\"><b>3. Link_category<\/b><\/h3><p><span style=\"font-weight: 400\">This taxonomy lets you categorize your links. If you link to many sources on your posts, you&rsquo;ll find this feature particularly useful.<\/span><\/p><h3 class=\"wp-block-heading\" id=\"h-4-post-format\"><b>4. Post_format<\/b><\/h3><p><span style=\"font-weight: 400\">Post_format enables you to categorize your posts based on the types <\/span><span style=\"font-weight: 400\">&ndash; videos, standard, audio, and more. You can find the panel next to your visual editor.<\/span><\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"277\" height=\"280\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/01\/format-wordpress-taxonomy.jpg\/public\" alt=\"format taxonomy\" class=\"wp-image-14191\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/format-wordpress-taxonomy.jpg 277w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/format-wordpress-taxonomy-148x150.jpg 148w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/format-wordpress-taxonomy-120x120.jpg 120w\" sizes=\"(max-width: 277px) 100vw, 277px\" \/><\/figure>\n<\/div><p><span style=\"font-weight: 400\"><\/span><\/p><h2 class=\"wp-block-heading\" id=\"h-custom-wordpress-taxonomies\"><b>Custom WordPress taxonomies<\/b><\/h2><p><span style=\"font-weight: 400\">At the right side of your visual editor, you can see the &ldquo;Categories&rdquo; and &ldquo;Tags&rdquo; label. What if you want to have your own taxonomy that says &ldquo;People&rdquo;? <\/span><span style=\"font-weight: 400\">Here&rsquo;s where custom taxonomy saves the day. You can customize your taxonomy to better accommodate your needs.<\/span><\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"277\" height=\"164\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/01\/people-tag-wordpress-taxonomy.jpg\/public\" alt=\"Customized people taxonomy\" class=\"wp-image-14192\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/people-tag-wordpress-taxonomy.jpg 277w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/people-tag-wordpress-taxonomy-150x89.jpg 150w\" sizes=\"(max-width: 277px) 100vw, 277px\" \/><\/figure>\n<\/div><p><span style=\"font-weight: 400\">For example, think of a fitness WordPress site. Instead of having a general taxonomy that says &ldquo;categories&rdquo;, it would be better to have custom taxonomies that say &ldquo;Cardio&rdquo; and &ldquo;Floor Exercises&rdquo;. Each taxonomy can be further modified with sub-categories like &ldquo;Jogging&rdquo;, &ldquo;Intermittent running&rdquo;, and &ldquo;Crunches&rdquo;. The same case goes with tags. You can have a tag that says &ldquo;Fitness Instructor&rdquo; instead of the default names.<\/span><\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-create-custom-taxonomies-in-wordpress\">How to create custom taxonomies in WordPress<\/h2><p><span style=\"font-weight: 400\">There are two different ways of creating Custom Taxonomies in WordPress. You can do it with plugins, or you can do it through coding. <\/span><\/p><h3 class=\"wp-block-heading\" id=\"h-using-plugins-to-create-custom-taxonomies\">Using plugins to create custom taxonomies<\/h3><p><span style=\"font-weight: 400\">Plugins make everything easy and creating a custom taxonomy is no exception. You don&rsquo;t need any technical knowledge to do it. <\/span><\/p><p><span style=\"font-weight: 400\">The recommended plugins for creating custom taxonomies are <a href=\"https:\/\/wordpress.org\/plugins\/custom-post-type-ui\/\" target=\"_blank\" rel=\"noopener\">Custom Post Types UI<\/a>&nbsp;and Pods. Let&rsquo;s try using the former for the example.<\/span><\/p><ol class=\"wp-block-list\">\n<li><span style=\"font-weight: 400\">Install and activate Custom Post Types UI<\/span><\/li>\n\n\n\n<li>Head to <strong>CPT UI<\/strong>&nbsp;-&gt;&nbsp;<strong>Add\/Edit Taxonomies<\/strong><\/li>\n\n\n\n<li>Complete the box with your taxonomy name. In our case, we use &ldquo;Floor Exercise&rdquo;. Also, choose the custom post types on which you want to apply the new taxonomy.<img decoding=\"async\" width=\"843\" height=\"583\" class=\"aligncenter size-full wp-image-14193\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/01\/custom-taxonomies-wordpress-taxonomy.jpg\" alt=\"creating custom taxonomies with CTP UI\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/custom-taxonomies-wordpress-taxonomy.jpg 843w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/custom-taxonomies-wordpress-taxonomy-150x104.jpg 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/custom-taxonomies-wordpress-taxonomy-300x207.jpg 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/custom-taxonomies-wordpress-taxonomy-768x531.jpg 768w\" sizes=\"(max-width: 843px) 100vw, 843px\" \/><\/li>\n\n\n\n<li>Hit&nbsp;<strong>Add Taxonomy<\/strong> button at the bottom.<\/li>\n\n\n\n<li>If you head to <strong>Posts<\/strong>&nbsp;-&gt; <strong>Add New<\/strong>, the new taxonomy will appear next to the visual editor.<img decoding=\"async\" width=\"900\" height=\"396\" class=\"aligncenter size-full wp-image-14194\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/01\/floor-exercise-wordpress-taxonomy.jpg\" alt=\"floor exercise new taxonomy on visual editor\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/floor-exercise-wordpress-taxonomy.jpg 900w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/floor-exercise-wordpress-taxonomy-150x66.jpg 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/floor-exercise-wordpress-taxonomy-300x132.jpg 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/floor-exercise-wordpress-taxonomy-768x338.jpg 768w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/li>\n<\/ol><p>You may notice that the new taxonomy is a <strong>tag<\/strong> called &ldquo;Floor Exercise&rdquo;. What if you want to create a category instead? Easy! Scroll down a bit and change <strong>Hierarchical&nbsp;<\/strong>to <strong>True<\/strong>.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"842\" height=\"327\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/01\/custom-categories-wordpress-taxonomy.jpg\/public\" alt=\"changing tags to categories in CTP UI\" class=\"wp-image-14195\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/custom-categories-wordpress-taxonomy.jpg 842w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/custom-categories-wordpress-taxonomy-150x58.jpg 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/custom-categories-wordpress-taxonomy-300x117.jpg 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/custom-categories-wordpress-taxonomy-768x298.jpg 768w\" sizes=\"(max-width: 842px) 100vw, 842px\" \/><\/figure>\n<\/div><p>The result will look like this:<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"277\" height=\"299\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/01\/floor-exercise-category-wordpress-taxonomy.jpg\/public\" alt=\"floor exercise custom categories\" class=\"wp-image-14196\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/floor-exercise-category-wordpress-taxonomy.jpg 277w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/01\/floor-exercise-category-wordpress-taxonomy-139x150.jpg 139w\" sizes=\"(max-width: 277px) 100vw, 277px\" \/><\/figure>\n<\/div><p>You can also use the plugin to create <a href=\"\/uk\/tutorials\/wordpress-custom-post-types\/\">Custom Post Types<\/a>.<\/p><h3 class=\"wp-block-heading\" id=\"h-adding-code-to-functions-php\"><b>Adding code to functions.php<\/b><\/h3><p><span style=\"font-weight: 400\">You should choose this method only if you are comfortable with coding. If not, ignore this tutorial and stick to using plugins only.<\/span><\/p><p><span style=\"font-weight: 400\">For advanced users, you only need to add a few lines of the <strong>functions.php<\/strong> file of your theme&rsquo;s directory. Please be aware that the codes for the hierarchical taxonomy are different from the non-hierarchical one. <\/span><\/p><p><span style=\"font-weight: 400\">Take a look at the example below.<\/span><\/p><p><b>Hierarchical taxonomy (category):<\/b><\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/hook into the init action and call create_book_taxonomies when it fires\nadd_action( 'init', 'create_topics_hierarchical_taxonomy', 0 );\n\n\/\/create a custom taxonomy name it topics for your posts\nfunction create_topics_hierarchical_taxonomy() {\n\n\/\/ Add new taxonomy, make it hierarchical like categories\n\n\/\/first do the translations part for GUI\n&nbsp;$labels = array(\n&nbsp;&nbsp;&nbsp;'name' =_x( 'Topics', 'taxonomy general name' ),\n&nbsp;&nbsp;&nbsp;'singular_name' =_x( 'Topic', 'taxonomy singular name' ),\n&nbsp;&nbsp;&nbsp;'search_items' =__( 'Search Topics' ),\n&nbsp;&nbsp;&nbsp;'all_items' =__( 'All Topics' ),\n&nbsp;&nbsp;&nbsp;'parent_item' =__( 'Parent Topic' ),\n&nbsp;&nbsp;&nbsp;'parent_item_colon' =__( 'Parent Topic:' ),\n&nbsp;&nbsp;&nbsp;'edit_item' =__( 'Edit Topic' ),\n&nbsp;&nbsp;&nbsp;'update_item' =__( 'Update Topic' ),\n&nbsp;&nbsp;&nbsp;'add_new_item' =__( 'Add New Topic' ),\n&nbsp;&nbsp;&nbsp;'new_item_name' =__( 'New Topic Name' ),\n&nbsp;&nbsp;&nbsp;'menu_name' =__( 'Topics' ),\n&nbsp;); &nbsp;\n\n\/\/ Now register the taxonomy\n&nbsp;register_taxonomy('topics',array('post'), array(\n&nbsp;&nbsp;&nbsp;'hierarchical' =true,\n&nbsp;&nbsp;&nbsp;'labels' =$labels,\n&nbsp;&nbsp;&nbsp;'show_ui' =true,\n&nbsp;&nbsp;&nbsp;'show_admin_column' =true,\n&nbsp;&nbsp;&nbsp;'query_var' =true,\n&nbsp;&nbsp;&nbsp;'rewrite' =array( 'slug' = 'topic' ),\n&nbsp;));\n}<\/pre><p><b>Non-hierarchical taxonomy (tag)<\/b><span style=\"font-weight: 400\">:<\/span><\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/hook into the init action and call create_book_taxonomies when it fires\nadd_action( 'init', 'create_topics_hierarchical_taxonomy', 0 );\n\n\/\/create a custom taxonomy name it topics for your posts\nfunction create_topics_hierarchical_taxonomy() {\n\n\/\/ Add new taxonomy, make it hierarchical like categories\n\n\/\/first do the translations part for GUI\n&nbsp;$labels = array(\n&nbsp;&nbsp;&nbsp;'name' =_x( 'Topics', 'taxonomy general name' ),\n&nbsp;&nbsp;&nbsp;'singular_name' =_x( 'Topic', 'taxonomy singular name' ),\n&nbsp;&nbsp;&nbsp;'search_items' =__( 'Search Topics' ),\n&nbsp;&nbsp;&nbsp;'all_items' =__( 'All Topics' ),\n&nbsp;&nbsp;&nbsp;'parent_item' =__( 'Parent Topic' ),\n&nbsp;&nbsp;&nbsp;'parent_item_colon' =__( 'Parent Topic:' ),\n&nbsp;&nbsp;&nbsp;'edit_item' =__( 'Edit Topic' ),\n&nbsp;&nbsp;&nbsp;'update_item' =__( 'Update Topic' ),\n&nbsp;&nbsp;&nbsp;'add_new_item' =__( 'Add New Topic' ),\n&nbsp;&nbsp;&nbsp;'new_item_name' =__( 'New Topic Name' ),\n&nbsp;&nbsp;&nbsp;'menu_name' =__( 'Topics' ),\n&nbsp;); &nbsp;\n\n\/\/ Now register the taxonomy\n&nbsp;register_taxonomy('topics',array('post'), array(\n&nbsp;&nbsp;&nbsp;'hierarchical' =true,\n&nbsp;&nbsp;&nbsp;'labels' =$labels,\n&nbsp;&nbsp;&nbsp;'show_ui' =true,\n&nbsp;&nbsp;&nbsp;'show_admin_column' =true,\n&nbsp;&nbsp;&nbsp;'query_var' =true,\n&nbsp;&nbsp;&nbsp;'rewrite' =array( 'slug' = 'topic' ),\n&nbsp;));\n}<\/pre><p><span style=\"font-weight: 400\">To show the new taxonomy in your visual editor, open single.php from Editor and copy this code:<\/span><\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">the_terms( $post-ID, 'topics', 'Topics: ', ', ', ' ' );<\/pre><p><span style=\"font-weight: 400\">That&rsquo;s it! If the process is done correctly, a new taxonomy called &ldquo;Topic&rdquo; will appear on your visual editor.<\/span><\/p><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p><span style=\"font-weight: 400\">WordPress Taxonomy is used to group your content. You can use categories for broad topics, and tags for details in your text. You can also create custom taxonomies using plugins or <strong>functions.php<\/strong> file.<\/span><\/p><p><span style=\"font-weight: 400\">Correctly utilizing WordPress taxonomies will help boost your website&rsquo;s user experience.<\/span><\/p><p>\n\n\n        <div class=\"protip\">\n            <div class=\"protip__heading\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                    <path d=\"M1.49234 23.5024C1.23229 23.5024 0.972242 23.4024 0.782206 23.2123C0.562165 22.9923 0.452144 22.6822 0.502153 22.3722C0.562165 21.9221 1.14227 17.9113 3.00262 16.351C3.63274 15.8209 4.43289 15.5509 5.26305 15.5609C6.09321 15.5909 6.87335 15.9109 7.47347 16.4911C8.6937 17.6913 8.76371 19.6717 7.6435 20.9919C6.0832 22.8523 2.08245 23.4324 1.63237 23.4924C1.59236 23.4924 1.54235 23.4924 1.50234 23.4924L1.49234 23.5024ZM5.16303 17.5613C4.84297 17.5613 4.53291 17.6713 4.29287 17.8813C3.60274 18.4614 3.07264 19.9317 2.75258 21.242C4.06282 20.9219 5.5331 20.3918 6.11321 19.7017C6.55329 19.1716 6.54329 18.3814 6.0832 17.9213C5.85316 17.7013 5.5431 17.5713 5.20304 17.5613C5.19304 17.5613 5.17303 17.5613 5.16303 17.5613ZM11.7243 21.8821C11.4942 21.8821 11.2642 21.8021 11.0841 21.652C10.8541 21.462 10.7241 21.1819 10.7241 20.8819V15.9109L8.08358 13.2705H3.11264C2.81259 13.2705 2.53254 13.1404 2.3425 12.9104C2.15246 12.6803 2.07245 12.3803 2.12246 12.0902C2.19247 11.7102 2.84259 8.36953 4.70294 7.12929C6.33325 6.04909 8.96375 6.49918 10.244 6.80923C11.5442 4.96889 13.2546 3.4286 15.2349 2.33839C17.4553 1.11816 19.9858 0.518051 22.4963 0.498047C23.0464 0.498047 23.4865 0.948132 23.4865 1.49824C23.4865 5.0389 22.3763 9.97983 17.1753 13.7605C17.4853 15.0408 17.9354 17.6613 16.8552 19.2816C15.615 21.1419 12.2744 21.7921 11.8943 21.8621C11.8343 21.8721 11.7743 21.8821 11.7143 21.8821H11.7243ZM12.7245 16.181V19.6016C13.7146 19.2916 14.7948 18.7915 15.2049 18.1814C15.675 17.4812 15.605 16.091 15.385 14.9008C14.5248 15.3808 13.6346 15.8109 12.7245 16.181ZM9.66388 12.0302L11.9643 14.3307C13.1845 13.8306 14.3648 13.2204 15.485 12.5103C19.9358 9.51974 21.2361 5.60901 21.4561 2.53843C19.6157 2.67846 17.8254 3.20856 16.2051 4.09872C14.2847 5.14892 12.6544 6.68921 11.4942 8.54956C10.7841 9.65977 10.174 10.82 9.66388 12.0302ZM4.39289 11.2701H7.81353C8.1936 10.3599 8.63368 9.46974 9.11377 8.60957C7.92355 8.38953 6.51329 8.31952 5.81315 8.78961C5.19304 9.19968 4.70294 10.3099 4.39289 11.2701Z\" fill=\"#673DE6\"\/>\n                <\/svg>\n                <p class=\"protip__title\">\n                    Learn What Else You Can Do With WordPress                <\/p>\n            <\/div>\n            <p class=\"protip__content\"><a href=\"\/uk\/tutorials\/wordpress\/how-to-login-to-wordpress-dashboard\/\">How to Login to WordPress<\/a><br>\n<a href=\"\/uk\/tutorials\/wordpress\/how-to-schedule-posts-in-wordpress\/\">How to Schedule Posts in WordPress<\/a><br>\n<a href=\"\/uk\/tutorials\/how-to-add-wordpress-related-posts\/\">How to Add WordPress Related Posts<\/a><br>\n<a href=\"\/uk\/tutorials\/wordpress-menu-icons\/\">2 Methods on Adding WordPress Menu Icons\"<\/a><br>\n<a href=\"\/uk\/tutorials\/how-to-reinstall-wordpress\/\">How to Reinstall WordPress<\/a><br>\n<a href=\"\/uk\/tutorials\/wordpress\/how-to-add-facebook-like-button-to-wordpress\/\">How to Add Facebook Like Button to WordPress<\/a><br>\n<a href=\"\/uk\/tutorials\/install-wordpress-on-subdomain\/\">How to Install WordPress on a Subdomain<\/a><br>\n<a href=\"\/uk\/tutorials\/wordpress-favicon\/\">Guide to WordPress Favicons<\/a><br>\n<a href=\"\/uk\/tutorials\/create-manage-wordpress-user-roles-permissions\/\">How to Manage User Roles and Permissions in WordPress<\/a><\/p>\n                    <\/div>\n        \n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress Codex defines taxonomy as a grouping mechanism for all of your content. In short, it allows you to group your posts based on shared characteristics. Let&rsquo;s say that you have a website about movies. Chances are you want to group the movies based on genre. Taxonomies allow you to do just that, thus helping [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/uk\/tutorials\/wordpress-taxonomy\/\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":2,"featured_media":75210,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"What Is WordPress Taxonomy and How to Create a Custom One","rank_math_description":"WordPress taxonomy is used to group posts types together based upon characteristics that the posts share. Read this article to learn more!","rank_math_focus_keyword":"wordpress taxonomy","footnotes":""},"categories":[22638,22633],"tags":[],"class_list":["post-14105","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-content-creation","category-wordpress"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/wordpress-taxonomy","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/taxonomie-wordpress","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/taxonomia-wordpress","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/apa-itu-taksonomi-wordpress","default":0},{"locale":"en-GB","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/wordpress-taxonomy","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/wordpress-taxonomy\/","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/wordpress-taxonomy\/","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/taxonomia-wordpress","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/taxonomia-wordpress","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/taxonomia-wordpress","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/wordpress-taxonomy","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/wordpress-taxonomy","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/wordpress-taxonomy","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/wordpress-taxonomy","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/posts\/14105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/comments?post=14105"}],"version-history":[{"count":29,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/posts\/14105\/revisions"}],"predecessor-version":[{"id":126849,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/posts\/14105\/revisions\/126849"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/media\/75210"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/media?parent=14105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/categories?post=14105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/tags?post=14105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}