{"id":6233,"date":"2017-01-03T16:23:23","date_gmt":"2017-01-03T21:23:23","guid":{"rendered":"https:\/\/themespress.ca\/?p=6233"},"modified":"2022-09-04T08:07:45","modified_gmt":"2022-09-04T12:07:45","slug":"list-custom-posts-types-taxonomy","status":"publish","type":"post","link":"https:\/\/themespress.ca\/en\/list-custom-posts-types-taxonomy\/","title":{"rendered":"List custom posts types taxonomy"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><div class=\"vc_row wpb_row vc_row-fluid\"><div class=\"wpb_column vc_column_container vc_col-sm-12\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>For this tutorial, it&#8217;s important that your custom post type is configured with <strong><a href=\"https:\/\/codex.wordpress.org\/Function_Reference\/register_taxonomy\" target=\"_blank\" rel=\"noopener\">register_taxonomy<\/a><\/strong>. <\/p>\n<p>It&#8217;s a nice and easy way to list your custom post type&#8217;s categories. By default, we need to display post categories with wp_list_categories.<\/p>\n\n\t\t<\/div>\n\t<\/div>\n<div id=\"ts-enlighterjs-container-5711865\" class=\"ts-enlighterjs-container-single-enabled  \" style=\"width: 100%;  margin-top: 0px; margin-bottom: 0px;\" data-enlighter-doubleclick=\"true\" data-enlighter-windowbutton=\"true\" data-enlighter-windowtext=\"New Window\" data-enlighter-rawbutton=\"true\" data-enlighter-rawtext=\"RAW Code\" data-enlighter-infobutton=\"false\" data-enlighter-infotext=\"EnlighterJS\" data-enlighter-indent=\"2\"><pre id=\"ts-enlighterjs-pre-5711865\" class=\"\" style=\"white-space: pre-wrap; height: 100%; margin: 0; padding: 0;\" data-enlighter-language=\"standard\" data-enlighter-theme=\"enlighter\" data-enlighter-group=\"\" data-enlighter-title=\"\" data-enlighter-linenumbers=\"true\" data-enlighter-lineoffset=\"1\" data-enlighter-highlight=\"\">&lt;?php wp_list_categories(); ?&gt;<\/pre><\/div>\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>Here&#8217;s an example of register_taxonomy and the taxonomy that needs to be recuperated. In this case it&#8217;s <strong>collaborateurs_cat<\/strong>.<\/p>\n\n\t\t<\/div>\n\t<\/div>\n<div id=\"ts-enlighterjs-container-5534418\" class=\"ts-enlighterjs-container-single-enabled  \" style=\"width: 100%;  margin-top: 0px; margin-bottom: 0px;\" data-enlighter-doubleclick=\"true\" data-enlighter-windowbutton=\"true\" data-enlighter-windowtext=\"New Window\" data-enlighter-rawbutton=\"true\" data-enlighter-rawtext=\"RAW Code\" data-enlighter-infobutton=\"false\" data-enlighter-infotext=\"EnlighterJS\" data-enlighter-indent=\"2\"><pre id=\"ts-enlighterjs-pre-5534418\" class=\"\" style=\"white-space: pre-wrap; height: 100%; margin: 0; padding: 0;\" data-enlighter-language=\"standard\" data-enlighter-theme=\"enlighter\" data-enlighter-group=\"\" data-enlighter-title=\"\" data-enlighter-linenumbers=\"true\" data-enlighter-lineoffset=\"1\" data-enlighter-highlight=\"\">\/\/ Cat&eacute;gories custom post type\n\/* Voici donc la taxonomie *\/\nregister_taxonomy( &#039;collaborateurs_cat&#039;, \n\/* nom du custom post type *\/\narray(&#039;collaborateurs&#039;), \narray(\n\t&#039;hierarchical&#039;             =&gt; true,\n\t&#039;labels&#039;                         =&gt; array(\n\t&#039;name&#039;                           =&gt; __( &#039;Cat&eacute;gories&#039;, &#039;nom du theme&#039; ),\n\t&#039;singular_name&#039;                  =&gt; __( &#039;Cat&eacute;gories&#039;, &#039;nom du theme&#039; ),\n\t&#039;search_items&#039;                   =&gt; __( &#039;Rechercher une cat&eacute;gorie&#039;, &#039;nom du theme&#039; ),\n\t&#039;all_items&#039;                      =&gt; __( &#039;Toutes les cat&eacute;gories&#039;, &#039;nom du theme&#039; ),\n\t&#039;parent_item&#039;                    =&gt; __( &#039;Cat&eacute;gorie parente&#039;, &#039;nom du theme&#039; ),\n\t&#039;parent_item_colon&#039;              =&gt; __( &#039;Cat&eacute;gorie parente :&#039;, &#039;nom du theme&#039; ),\n\t&#039;edit_item&#039;                      =&gt; __( &#039;&Eacute;diter une cat&eacute;gorie&#039;, &#039;nom du theme&#039; ),\n\t&#039;update_item&#039;                    =&gt; __( &#039;Sauvegarder une cat&eacute;gorie&#039;, &#039;nom du theme&#039; ),\n\t&#039;add_new_item&#039;                   =&gt; __( &#039;Ajouter une cat&eacute;gorie&#039;, &#039;nom du theme&#039; ),\n\t&#039;new_item_name&#039;                  =&gt; __( &#039;Nouvelle cat&eacute;gorie&#039;, &#039;nom du theme&#039; )\n),\n    &#039;show_admin_column&#039;              =&gt; true,\n    &#039;show_ui&#039;                        =&gt; true,\n    &#039;query_var&#039;                      =&gt; true,\n    &#039;rewrite&#039;                        =&gt; array( &#039;slug&#039; =&gt; &#039;collaborateurs&#039; ),\n)\n);<\/pre><\/div>\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>You will need to customize it so it display the custom post type&#8217;s category taxonomy; the solution is to properly use its taxonomy. Here&#8217;s how to use get_terms.<\/p>\n\n\t\t<\/div>\n\t<\/div>\n<div id=\"ts-enlighterjs-container-4523738\" class=\"ts-enlighterjs-container-single-enabled  \" style=\"width: 100%;  margin-top: 0px; margin-bottom: 0px;\" data-enlighter-doubleclick=\"true\" data-enlighter-windowbutton=\"true\" data-enlighter-windowtext=\"New Window\" data-enlighter-rawbutton=\"true\" data-enlighter-rawtext=\"RAW Code\" data-enlighter-infobutton=\"false\" data-enlighter-infotext=\"EnlighterJS\" data-enlighter-indent=\"2\"><pre id=\"ts-enlighterjs-pre-4523738\" class=\"\" style=\"white-space: pre-wrap; height: 100%; margin: 0; padding: 0;\" data-enlighter-language=\"standard\" data-enlighter-theme=\"enlighter\" data-enlighter-group=\"\" data-enlighter-title=\"\" data-enlighter-linenumbers=\"true\" data-enlighter-lineoffset=\"1\" data-enlighter-highlight=\"\">&lt;?php \n\/\/ R&eacute;cup&eacute;rer la taxonomie dans une variable \n$taxonomy = &#039;collaborateurs_cat&#039;; \n\/\/ Variable avec le get_terms \n$tax_terms = get_terms($taxonomy, array(&#039;hide_empty&#039; =&gt; false)); \n?&gt;<\/pre><\/div><\/div><\/div><\/div><\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"For this tutorial, it's important that your custom post type is configured with register_taxonomy. It's a nice and easy way to list your custom post type's categories. By default, we<div class=\"read-more\"><a class=\"btn button-secondary\" href=\"https:\/\/themespress.ca\/en\/list-custom-posts-types-taxonomy\/\">Read More<\/a><\/div>","protected":false},"author":81,"featured_media":4582,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[283],"tags":[357],"class_list":["post-6233","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-taxonomy"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Share the post &quot;List custom posts types taxonomy&quot; Facebook LinkedIn Twitter Partager... E-mail Ajouter aux favoris Bluesky For this tutorial, it\u2019s important that your custom post type is configured with register_taxonomy. It\u2019s a nice and easy way to list your custom post type\u2019s categories. By default, we need to display post categories with wp_list_categories.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Daniel\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/themespress.ca\/en\/list-custom-posts-types-taxonomy\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Themespress - Des tutoriels et ressources WordPress\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"List custom posts types taxonomy - Themespress\" \/>\n\t\t<meta property=\"og:description\" content=\"Share the post &quot;List custom posts types taxonomy&quot; Facebook LinkedIn Twitter Partager... E-mail Ajouter aux favoris Bluesky For this tutorial, it\u2019s important that your custom post type is configured with register_taxonomy. It\u2019s a nice and easy way to list your custom post type\u2019s categories. By default, we need to display post categories with wp_list_categories.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/themespress.ca\/en\/list-custom-posts-types-taxonomy\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2017-01-03T21:23:23-05:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-09-04T12:07:45-04:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"List custom posts types taxonomy - Themespress\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Share the post &quot;List custom posts types taxonomy&quot; Facebook LinkedIn Twitter Partager... E-mail Ajouter aux favoris Bluesky For this tutorial, it\u2019s important that your custom post type is configured with register_taxonomy. It\u2019s a nice and easy way to list your custom post type\u2019s categories. By default, we need to display post categories with wp_list_categories.\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/list-custom-posts-types-taxonomy\\\/#blogposting\",\"name\":\"List custom posts types taxonomy - Themespress\",\"headline\":\"List custom posts types taxonomy\",\"author\":{\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/author\\\/daniel\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/themespress.ca\\\/wp-content\\\/uploads\\\/2017\\\/02\\\/wsi-imageoptim-Afficher-la-liste-des-cat\\u00e9gories-List-custom-posts-types-taxonomy-.jpg\",\"width\":1031,\"height\":582},\"datePublished\":\"2017-01-03T16:23:23-05:00\",\"dateModified\":\"2022-09-04T08:07:45-04:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/list-custom-posts-types-taxonomy\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/list-custom-posts-types-taxonomy\\\/#webpage\"},\"articleSection\":\"Tutorials, Taxonomy\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/list-custom-posts-types-taxonomy\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/#listItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/themespress.ca\\\/en\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/categorie\\\/tutorials\\\/#listItem\",\"name\":\"Tutorials\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/categorie\\\/tutorials\\\/#listItem\",\"position\":2,\"name\":\"Tutorials\",\"item\":\"https:\\\/\\\/themespress.ca\\\/en\\\/categorie\\\/tutorials\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/list-custom-posts-types-taxonomy\\\/#listItem\",\"name\":\"List custom posts types taxonomy\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/#listItem\",\"name\":\"Accueil\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/list-custom-posts-types-taxonomy\\\/#listItem\",\"position\":3,\"name\":\"List custom posts types taxonomy\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/categorie\\\/tutorials\\\/#listItem\",\"name\":\"Tutorials\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/#organization\",\"name\":\"Themespress\",\"description\":\"Des tutoriels et ressources WordPress\",\"url\":\"https:\\\/\\\/themespress.ca\\\/en\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/author\\\/daniel\\\/#author\",\"url\":\"https:\\\/\\\/themespress.ca\\\/en\\\/author\\\/daniel\\\/\",\"name\":\"Daniel\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/list-custom-posts-types-taxonomy\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/93cd2188e40b3289d305e88acb676eb8b84078e50e06f4eb38a0152903b34c9d?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Daniel\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/list-custom-posts-types-taxonomy\\\/#webpage\",\"url\":\"https:\\\/\\\/themespress.ca\\\/en\\\/list-custom-posts-types-taxonomy\\\/\",\"name\":\"List custom posts types taxonomy - Themespress\",\"description\":\"Share the post \\\"List custom posts types taxonomy\\\" Facebook LinkedIn Twitter Partager... E-mail Ajouter aux favoris Bluesky For this tutorial, it\\u2019s important that your custom post type is configured with register_taxonomy. It\\u2019s a nice and easy way to list your custom post type\\u2019s categories. By default, we need to display post categories with wp_list_categories.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/list-custom-posts-types-taxonomy\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/author\\\/daniel\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/author\\\/daniel\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/themespress.ca\\\/wp-content\\\/uploads\\\/2017\\\/02\\\/wsi-imageoptim-Afficher-la-liste-des-cat\\u00e9gories-List-custom-posts-types-taxonomy-.jpg\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/list-custom-posts-types-taxonomy\\\/#mainImage\",\"width\":1031,\"height\":582},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/list-custom-posts-types-taxonomy\\\/#mainImage\"},\"datePublished\":\"2017-01-03T16:23:23-05:00\",\"dateModified\":\"2022-09-04T08:07:45-04:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/themespress.ca\\\/en\\\/\",\"name\":\"Themespress\",\"description\":\"Des tutoriels et ressources WordPress\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"List custom posts types taxonomy - Themespress","description":"Share the post \"List custom posts types taxonomy\" Facebook LinkedIn Twitter Partager... E-mail Ajouter aux favoris Bluesky For this tutorial, it\u2019s important that your custom post type is configured with register_taxonomy. It\u2019s a nice and easy way to list your custom post type\u2019s categories. By default, we need to display post categories with wp_list_categories.","canonical_url":"https:\/\/themespress.ca\/en\/list-custom-posts-types-taxonomy\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/themespress.ca\/en\/list-custom-posts-types-taxonomy\/#blogposting","name":"List custom posts types taxonomy - Themespress","headline":"List custom posts types taxonomy","author":{"@id":"https:\/\/themespress.ca\/en\/author\/daniel\/#author"},"publisher":{"@id":"https:\/\/themespress.ca\/en\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/themespress.ca\/wp-content\/uploads\/2017\/02\/wsi-imageoptim-Afficher-la-liste-des-cat\u00e9gories-List-custom-posts-types-taxonomy-.jpg","width":1031,"height":582},"datePublished":"2017-01-03T16:23:23-05:00","dateModified":"2022-09-04T08:07:45-04:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/themespress.ca\/en\/list-custom-posts-types-taxonomy\/#webpage"},"isPartOf":{"@id":"https:\/\/themespress.ca\/en\/list-custom-posts-types-taxonomy\/#webpage"},"articleSection":"Tutorials, Taxonomy"},{"@type":"BreadcrumbList","@id":"https:\/\/themespress.ca\/en\/list-custom-posts-types-taxonomy\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/themespress.ca\/en\/#listItem","position":1,"name":"Accueil","item":"https:\/\/themespress.ca\/en\/","nextItem":{"@type":"ListItem","@id":"https:\/\/themespress.ca\/en\/categorie\/tutorials\/#listItem","name":"Tutorials"}},{"@type":"ListItem","@id":"https:\/\/themespress.ca\/en\/categorie\/tutorials\/#listItem","position":2,"name":"Tutorials","item":"https:\/\/themespress.ca\/en\/categorie\/tutorials\/","nextItem":{"@type":"ListItem","@id":"https:\/\/themespress.ca\/en\/list-custom-posts-types-taxonomy\/#listItem","name":"List custom posts types taxonomy"},"previousItem":{"@type":"ListItem","@id":"https:\/\/themespress.ca\/en\/#listItem","name":"Accueil"}},{"@type":"ListItem","@id":"https:\/\/themespress.ca\/en\/list-custom-posts-types-taxonomy\/#listItem","position":3,"name":"List custom posts types taxonomy","previousItem":{"@type":"ListItem","@id":"https:\/\/themespress.ca\/en\/categorie\/tutorials\/#listItem","name":"Tutorials"}}]},{"@type":"Organization","@id":"https:\/\/themespress.ca\/en\/#organization","name":"Themespress","description":"Des tutoriels et ressources WordPress","url":"https:\/\/themespress.ca\/en\/"},{"@type":"Person","@id":"https:\/\/themespress.ca\/en\/author\/daniel\/#author","url":"https:\/\/themespress.ca\/en\/author\/daniel\/","name":"Daniel","image":{"@type":"ImageObject","@id":"https:\/\/themespress.ca\/en\/list-custom-posts-types-taxonomy\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/93cd2188e40b3289d305e88acb676eb8b84078e50e06f4eb38a0152903b34c9d?s=96&d=mm&r=g","width":96,"height":96,"caption":"Daniel"}},{"@type":"WebPage","@id":"https:\/\/themespress.ca\/en\/list-custom-posts-types-taxonomy\/#webpage","url":"https:\/\/themespress.ca\/en\/list-custom-posts-types-taxonomy\/","name":"List custom posts types taxonomy - Themespress","description":"Share the post \"List custom posts types taxonomy\" Facebook LinkedIn Twitter Partager... E-mail Ajouter aux favoris Bluesky For this tutorial, it\u2019s important that your custom post type is configured with register_taxonomy. It\u2019s a nice and easy way to list your custom post type\u2019s categories. By default, we need to display post categories with wp_list_categories.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/themespress.ca\/en\/#website"},"breadcrumb":{"@id":"https:\/\/themespress.ca\/en\/list-custom-posts-types-taxonomy\/#breadcrumblist"},"author":{"@id":"https:\/\/themespress.ca\/en\/author\/daniel\/#author"},"creator":{"@id":"https:\/\/themespress.ca\/en\/author\/daniel\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/themespress.ca\/wp-content\/uploads\/2017\/02\/wsi-imageoptim-Afficher-la-liste-des-cat\u00e9gories-List-custom-posts-types-taxonomy-.jpg","@id":"https:\/\/themespress.ca\/en\/list-custom-posts-types-taxonomy\/#mainImage","width":1031,"height":582},"primaryImageOfPage":{"@id":"https:\/\/themespress.ca\/en\/list-custom-posts-types-taxonomy\/#mainImage"},"datePublished":"2017-01-03T16:23:23-05:00","dateModified":"2022-09-04T08:07:45-04:00"},{"@type":"WebSite","@id":"https:\/\/themespress.ca\/en\/#website","url":"https:\/\/themespress.ca\/en\/","name":"Themespress","description":"Des tutoriels et ressources WordPress","inLanguage":"en-US","publisher":{"@id":"https:\/\/themespress.ca\/en\/#organization"}}]},"og:locale":"en_US","og:site_name":"Themespress - Des tutoriels et ressources WordPress","og:type":"article","og:title":"List custom posts types taxonomy - Themespress","og:description":"Share the post &quot;List custom posts types taxonomy&quot; Facebook LinkedIn Twitter Partager... E-mail Ajouter aux favoris Bluesky For this tutorial, it\u2019s important that your custom post type is configured with register_taxonomy. It\u2019s a nice and easy way to list your custom post type\u2019s categories. By default, we need to display post categories with wp_list_categories.","og:url":"https:\/\/themespress.ca\/en\/list-custom-posts-types-taxonomy\/","article:published_time":"2017-01-03T21:23:23-05:00","article:modified_time":"2022-09-04T12:07:45-04:00","twitter:card":"summary","twitter:title":"List custom posts types taxonomy - Themespress","twitter:description":"Share the post &quot;List custom posts types taxonomy&quot; Facebook LinkedIn Twitter Partager... E-mail Ajouter aux favoris Bluesky For this tutorial, it\u2019s important that your custom post type is configured with register_taxonomy. It\u2019s a nice and easy way to list your custom post type\u2019s categories. By default, we need to display post categories with wp_list_categories."},"aioseo_meta_data":{"post_id":"6233","title":null,"description":null,"keywords":[],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[],"defaultGraph":"Article","defaultPostTypeGraph":""},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"},\"blockGraphs\":[]}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2022-09-04 12:00:23","updated":"2025-06-08 01:56:06","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/themespress.ca\/en\/\" title=\"Accueil\">Accueil<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/themespress.ca\/en\/categorie\/tutorials\/\" title=\"Tutorials\">Tutorials<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tList custom posts types taxonomy\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Accueil","link":"https:\/\/themespress.ca\/en\/"},{"label":"Tutorials","link":"https:\/\/themespress.ca\/en\/categorie\/tutorials\/"},{"label":"List custom posts types taxonomy","link":"https:\/\/themespress.ca\/en\/list-custom-posts-types-taxonomy\/"}],"_links":{"self":[{"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/posts\/6233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/users\/81"}],"replies":[{"embeddable":true,"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/comments?post=6233"}],"version-history":[{"count":0,"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/posts\/6233\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/media\/4582"}],"wp:attachment":[{"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/media?parent=6233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/categories?post=6233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/tags?post=6233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}