{"id":1512,"date":"2013-12-20T10:25:16","date_gmt":"2013-12-20T10:25:16","guid":{"rendered":"http:\/\/www.websitedesignwebsitedevelopment.com\/?p=1512"},"modified":"2014-03-19T09:13:36","modified_gmt":"2014-03-19T09:13:36","slug":"wordpress-custom-taxonomy-example","status":"publish","type":"post","link":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/wordpress-custom-taxonomy-example\/","title":{"rendered":"WordPress Custom Taxonomy Example"},"content":{"rendered":"<h2>WordPress Custom Taxonomy Example:<\/h2>\n<p><code>$_tType = 'Taxonomy Type';<br \/>\n$_tSlug = 'wp-taxonomy-type';<br \/>\n$_tId = str_replace(' ', '_', strtolower($_tType));<br \/>\nregister_taxonomy($_tId, 'post', array(<br \/>\n'hierarchical' =&gt; true,<br \/>\n'labels' =&gt; array(<br \/>\n'name' =&gt; _x( $_tType, 'taxonomy general name' ),<br \/>\n'singular_name' =&gt; _x( $_tType, 'taxonomy singular name' ),<br \/>\n'search_items' =&gt;\u00a0 __( 'Search '.$_tType ),<br \/>\n'all_items' =&gt; __( 'All '.$_tType ),<br \/>\n'parent_item' =&gt; __( 'Parent '.$_tType ),<br \/>\n'parent_item_colon' =&gt; __( 'Parent '.$_tType.':' ),<br \/>\n'edit_item' =&gt; __( 'Edit '.$_tType ),<br \/>\n'update_item' =&gt; __( 'Update '.$_tType ),<br \/>\n'add_new_item' =&gt; __( 'Add New '.$_tType ),<br \/>\n'new_item_name' =&gt; __( 'New '.$_tType ),<br \/>\n'menu_name' =&gt; __( $_tType ),<br \/>\n),<br \/>\n'rewrite' =&gt; array(<br \/>\n'slug' =&gt; $_tSlug,<br \/>\n'with_front' =&gt; false,<br \/>\n'hierarchical' =&gt; true<br \/>\n),<br \/>\n));<br \/>\n\/\/register_taxonomy_for_object_type( $_tId, 'another-post-type');<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress Custom Taxonomy Example: $_tType = &#8216;Taxonomy Type&#8217;; $_tSlug = &#8216;wp-taxonomy-type&#8217;; $_tId = str_replace(&#8216; &#8216;, &#8216;_&#8217;, strtolower($_tType)); register_taxonomy($_tId, &#8216;post&#8217;, array( &#8216;hierarchical&#8217; =&gt; true, &#8216;labels&#8217; =&gt; array( &#8216;name&#8217; =&gt; _x( $_tType, &#8216;taxonomy general name&#8217; ), &#8216;singular_name&#8217; =&gt; _x( $_tType, &#8216;taxonomy singular name&#8217; ), &#8216;search_items&#8217; =&gt;\u00a0 __( &#8216;Search &#8216;.$_tType ), &#8216;all_items&#8217; =&gt; __( &#8216;All &#8216;.$_tType ), &#8216;parent_item&#8217; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[12],"tags":[],"class_list":["post-1512","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>WordPress Custom Taxonomy Example<\/title>\n<meta name=\"description\" content=\"WordPress Custom Taxonomy Example\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/wordpress-custom-taxonomy-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WordPress Custom Taxonomy Example\" \/>\n<meta property=\"og:description\" content=\"WordPress Custom Taxonomy Example\" \/>\n<meta property=\"og:url\" content=\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/wordpress-custom-taxonomy-example\/\" \/>\n<meta property=\"og:site_name\" content=\"AndroidBubble Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pages\/Website-Design-Website-Development\/172363336135453\" \/>\n<meta property=\"article:published_time\" content=\"2013-12-20T10:25:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-03-19T09:13:36+00:00\" \/>\n<meta name=\"author\" content=\"Fahad\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fahad\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/wordpress-custom-taxonomy-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/wordpress-custom-taxonomy-example\/\"},\"author\":{\"name\":\"Fahad\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\"},\"headline\":\"WordPress Custom Taxonomy Example\",\"datePublished\":\"2013-12-20T10:25:16+00:00\",\"dateModified\":\"2014-03-19T09:13:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/wordpress-custom-taxonomy-example\/\"},\"wordCount\":8,\"articleSection\":[\"Wordpress\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/wordpress-custom-taxonomy-example\/\",\"url\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/wordpress-custom-taxonomy-example\/\",\"name\":\"WordPress Custom Taxonomy Example\",\"isPartOf\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/#website\"},\"datePublished\":\"2013-12-20T10:25:16+00:00\",\"dateModified\":\"2014-03-19T09:13:36+00:00\",\"author\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\"},\"description\":\"WordPress Custom Taxonomy Example\",\"breadcrumb\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/wordpress-custom-taxonomy-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/wordpress-custom-taxonomy-example\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/wordpress-custom-taxonomy-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/androidbubble.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Website Development\",\"item\":\"https:\/\/androidbubble.com\/blog\/category\/website-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"PHP Frameworks\",\"item\":\"https:\/\/androidbubble.com\/blog\/category\/website-development\/php-frameworks\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Wordpress\",\"item\":\"https:\/\/androidbubble.com\/blog\/category\/website-development\/php-frameworks\/wordpress\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"WordPress Custom Taxonomy Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#website\",\"url\":\"https:\/\/androidbubble.com\/blog\/\",\"name\":\"AndroidBubble Blog\",\"description\":\"Articles &amp; Posts\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/androidbubble.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\",\"name\":\"Fahad\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g\",\"caption\":\"Fahad\"},\"sameAs\":[\"http:\/\/www.androidbubbles.com\/\",\"https:\/\/x.com\/phpFlex\"],\"url\":\"https:\/\/androidbubble.com\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WordPress Custom Taxonomy Example","description":"WordPress Custom Taxonomy Example","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/wordpress-custom-taxonomy-example\/","og_locale":"en_US","og_type":"article","og_title":"WordPress Custom Taxonomy Example","og_description":"WordPress Custom Taxonomy Example","og_url":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/wordpress-custom-taxonomy-example\/","og_site_name":"AndroidBubble Blog","article_publisher":"https:\/\/www.facebook.com\/pages\/Website-Design-Website-Development\/172363336135453","article_published_time":"2013-12-20T10:25:16+00:00","article_modified_time":"2014-03-19T09:13:36+00:00","author":"Fahad","twitter_misc":{"Written by":"Fahad","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/wordpress-custom-taxonomy-example\/#article","isPartOf":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/wordpress-custom-taxonomy-example\/"},"author":{"name":"Fahad","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7"},"headline":"WordPress Custom Taxonomy Example","datePublished":"2013-12-20T10:25:16+00:00","dateModified":"2014-03-19T09:13:36+00:00","mainEntityOfPage":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/wordpress-custom-taxonomy-example\/"},"wordCount":8,"articleSection":["Wordpress"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/wordpress-custom-taxonomy-example\/","url":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/wordpress-custom-taxonomy-example\/","name":"WordPress Custom Taxonomy Example","isPartOf":{"@id":"https:\/\/androidbubble.com\/blog\/#website"},"datePublished":"2013-12-20T10:25:16+00:00","dateModified":"2014-03-19T09:13:36+00:00","author":{"@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7"},"description":"WordPress Custom Taxonomy Example","breadcrumb":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/wordpress-custom-taxonomy-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/wordpress-custom-taxonomy-example\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/wordpress-custom-taxonomy-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/androidbubble.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Website Development","item":"https:\/\/androidbubble.com\/blog\/category\/website-development\/"},{"@type":"ListItem","position":3,"name":"PHP Frameworks","item":"https:\/\/androidbubble.com\/blog\/category\/website-development\/php-frameworks\/"},{"@type":"ListItem","position":4,"name":"Wordpress","item":"https:\/\/androidbubble.com\/blog\/category\/website-development\/php-frameworks\/wordpress\/"},{"@type":"ListItem","position":5,"name":"WordPress Custom Taxonomy Example"}]},{"@type":"WebSite","@id":"https:\/\/androidbubble.com\/blog\/#website","url":"https:\/\/androidbubble.com\/blog\/","name":"AndroidBubble Blog","description":"Articles &amp; Posts","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/androidbubble.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7","name":"Fahad","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g","caption":"Fahad"},"sameAs":["http:\/\/www.androidbubbles.com\/","https:\/\/x.com\/phpFlex"],"url":"https:\/\/androidbubble.com\/blog\/author\/admin\/"}]}},"views":364,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/1512","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/comments?post=1512"}],"version-history":[{"count":4,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/1512\/revisions"}],"predecessor-version":[{"id":1516,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/1512\/revisions\/1516"}],"wp:attachment":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/media?parent=1512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/categories?post=1512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/tags?post=1512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}