{"id":22016,"date":"2019-09-11T23:56:15","date_gmt":"2019-09-11T15:56:15","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=22016"},"modified":"2022-10-18T20:12:09","modified_gmt":"2022-10-18T12:12:09","slug":"wordpress-custom-taxonomy-for-users","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-taxonomy-for-users\/","title":{"rendered":"How to Register Custom Taxonomy For WordPress Users"},"content":{"rendered":"<p>The <strong><a href=\"https:\/\/codex.wordpress.org\/Taxonomies\" rel=\"nofollow\">Custom Taxonomy<\/a><\/strong> feature has been introduced since WordPress 2.9. It allows you to create custom groups for Post, Page as well as Custom Post Types.<\/p>\n<p>Say that you are building a book directory website, and you have created a <a href=\"https:\/\/codex.wordpress.org\/Post_Types\" rel=\"nofollow\">Custom Post Type<\/a> for posting the <strong>Books<\/strong>. By using Custom Taxonomy, you can create a custom taxonomy for it, called <strong>Genre<\/strong>. Within this Genre taxonomy, you can create a number of items (which technically is called <strong>terms<\/strong>) such as Fiction, Kids, or Biography for grouping the Books.<\/p>\n<p>Unfortunately, at this point, <strong>we can\u2019t register Custom Taxonomy to Users<\/strong>; at least not in a straightforward way as we would register it in the other Post Types. One perfect application that we could foresee from this idea is that <strong>we can use it to assign additional user attributes<\/strong>, such as their <em>occupation<\/em>, <em>profession<\/em> or <em>organizational position<\/em>, in place of registering a new set of <a href=\"https:\/\/codex.wordpress.org\/Roles_and_Capabilities\" rel=\"nofollow\">User Roles<\/a>. It also opens the possibility to query the users based upon the assigned taxonomy terms.<\/p>\n<p>If this idea is something that may benefit your website, take a look at this tip.<\/p>\n<p class=\"note\"><strong>Recommended Reading:<\/strong> <a href=\"https:\/\/www.hongkiat.com\/blog\/wordpress-display-authors-pagination\/\">How To Display List Of Authors With Pagination<\/a><\/p>\n<h2>Getting Started<\/h2>\n<p>First, we will install a plugin named <strong><a href=\"https:\/\/wordpress.org\/\/plugins\/user-taxonomies\/\" rel=\"nofollow\">User Taxonomies<\/a><\/strong> to simplify our job.<\/p>\n<p>Once the plugin is activated. Go to GenerateWP to <a href=\"https:\/\/generatewp.com\/taxonomy\/\" rel=\"nofollow\">generate the Taxonomy codes<\/a>. Put the code output in the <strong>functions.php<\/strong> file of your theme. This code snippet below is an example. Though, it has been stripped out to make this article look shorter. You can <a href=\"https:\/\/generatewp.com\/snippet\/0MDnEMk\/\" rel=\"nofollow\">follow this link to see the full code<\/a>.<\/p>\n<pre>\r\nif ( ! function_exists( 'user_staff_position' ) ) {\r\nfunction user_staff_position() {\r\n\tregister_taxonomy( 'staff_position', 'post', $args );\r\n}\r\nadd_action( 'init', 'user_staff_position', 0 );\r\n}\r\n<\/pre>\n<p>Now, change the Post Type parameter in the following line:<\/p>\n<pre>\r\nregister_taxonomy( 'staff_position', 'post', $args );\r\n<\/pre>\n<p>\u2026from <code>post<\/code> to <code>user<\/code>, like so:<\/p>\n<pre>\r\nregister_taxonomy( 'staff_position', 'user', $args );\r\n<\/pre>\n<p>Now, go to the WP-Admin, and you should find a new menu added under the Users menu, as seen below.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/wordpress-custom-taxonomy-for-users\/new-user-menu.jpg\" alt=\"new user menu\" width=\"500\" height=\"200\"><\/figure>\n<h3>Assigning the Custom Taxonomy<\/h3>\n<p>Navigate to the new menu and create a few <em>terms<\/em>. For this example, we created two items: <strong>CEO<\/strong> and <strong>Managers<\/strong>.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/wordpress-custom-taxonomy-for-users\/create-user-taxonomy.jpg\" alt=\"create user tax\" width=\"500\" height=\"320\"><\/figure>\n<p>Then go to user editing screen and assign one item from the taxonomy to the user.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/wordpress-custom-taxonomy-for-users\/user-select-taxonomy.jpg\" alt=\"user select tax\" width=\"500\" height=\"200\"><\/figure>\n<h2>Query the Users<\/h2>\n<p>We are going to display the users in the theme based on the given term (of the taxonomy). But before going further, let\u2019s create a new page template. We are going add the codes throughout the following section within this new template.<\/p>\n<p>In this particular case, we won\u2019t be able to query the users with <code>get_users<\/code> or <code>WP_User_Query<\/code>; when you create a new <code>WP_User_Query<\/code> class, it does not output the Custom Taxonomy that is assigned to the users. Justin Tadlock, <a href=\"https:\/\/justintadlock.com\/archives\/2011\/10\/20\/custom-user-taxonomies-in-wordpress\" rel=\"nofollow\">in his tutorial<\/a>, shows us how to use the <code>get_objects_in_term<\/code> function, instead.<\/p>\n<p>This function outputs the object ID (which in our case <strong>the object means the user<\/strong>) that are tied with the term. To use it, we need two parameters: the Term ID and the Taxonomy name. You can spot the Term ID at the Browser URL bar when you edit it as shown below.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/wordpress-custom-taxonomy-for-users\/term-id.jpg\" alt=\"term id\" width=\"500\" height=\"100\"><\/figure>\n<p>Once you\u2019ve found the ID, put it within the function, like so.<\/p>\n<pre>\r\n$users = get_objects_in_term(3, 'user_position'); \r\n<\/pre>\n<p>You can use <code>var_dump()<\/code> to display the object IDs that have been retrieved; In my case, it returns the users with the ID of <code>1<\/code> and <code>3<\/code>.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/wordpress-custom-taxonomy-for-users\/user-object-id.jpg\" alt=\"user object id\" width=\"500\" height=\"104\"><\/figure>\n<p>Using these IDs, we can also retrieve, for example, the user name and avatar.<\/p>\n<pre>\r\n&lt;ul&gt;\r\n&lt;?php if ( !empty( $users ) ) : ?&gt;\r\n\t&lt;?php foreach ( $users as $id ) : ?&gt;\r\n\t\t&lt;li class=\"user-entry\"&gt;\r\n\t\t\t&lt;figure&gt;&lt;?php echo get_avatar( get_the_author_meta('email', $id), '40' ); ?&gt;&lt;\/figure&gt;\r\n\t\t\t&lt;h5 class=\"user-title\"&gt;&lt;a href=\"&lt;?php echo esc_url( get_author_posts_url( $id ) ); ?&gt;\"&gt;&lt;?php the_author_meta( 'display_name', $id ); ?&gt;&lt;\/a&gt;&lt;\/h5&gt;\r\n\t\t&lt;\/li&gt;\r\n\t&lt;?php endforeach; ?&gt;\r\n&lt;?php endif; ?&gt;\r\n&lt;\/ul&gt;\r\n<\/pre>\n<p>\u2026and, finally, here is the result.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/wordpress-custom-taxonomy-for-users\/query-result.jpg\" alt=\"query result\" width=\"500\" height=\"180\"><\/figure>\n<p>That\u2019s it. You can freely modify the above codes to meet your requirement.<\/p>","protected":false},"excerpt":{"rendered":"<p>The Custom Taxonomy feature has been introduced since WordPress 2.9. It allows you to create custom groups for Post, Page as well as Custom Post Types. Say that you are building a book directory website, and you have created a Custom Post Type for posting the Books. By using Custom Taxonomy, you can create a&hellip;<\/p>\n","protected":false},"author":113,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[49],"tags":[4663],"topic":[4520],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Register Custom Taxonomy For WordPress Users - Hongkiat<\/title>\n<meta name=\"description\" content=\"The Custom Taxonomy feature has been introduced since WordPress 2.9. It allows you to create custom groups for Post, Page as well as Custom Post Types.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-taxonomy-for-users\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Register Custom Taxonomy For WordPress Users\" \/>\n<meta property=\"og:description\" content=\"The Custom Taxonomy feature has been introduced since WordPress 2.9. It allows you to create custom groups for Post, Page as well as Custom Post Types.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-taxonomy-for-users\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2019-09-11T15:56:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-18T12:12:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/wordpress-custom-taxonomy-for-users\/new-user-menu.jpg\" \/>\n<meta name=\"author\" content=\"Thoriq Firdaus\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@tfirdaus\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Thoriq Firdaus\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-taxonomy-for-users\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-taxonomy-for-users\\\/\"},\"author\":{\"name\":\"Thoriq Firdaus\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\"},\"headline\":\"How to Register Custom Taxonomy For WordPress Users\",\"datePublished\":\"2019-09-11T15:56:15+00:00\",\"dateModified\":\"2022-10-18T12:12:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-taxonomy-for-users\\\/\"},\"wordCount\":558,\"commentCount\":17,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-taxonomy-for-users\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/wordpress-custom-taxonomy-for-users\\\/new-user-menu.jpg\",\"keywords\":[\"ad-divi\"],\"articleSection\":[\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-taxonomy-for-users\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-taxonomy-for-users\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-taxonomy-for-users\\\/\",\"name\":\"How to Register Custom Taxonomy For WordPress Users - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-taxonomy-for-users\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-taxonomy-for-users\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/wordpress-custom-taxonomy-for-users\\\/new-user-menu.jpg\",\"datePublished\":\"2019-09-11T15:56:15+00:00\",\"dateModified\":\"2022-10-18T12:12:09+00:00\",\"description\":\"The Custom Taxonomy feature has been introduced since WordPress 2.9. It allows you to create custom groups for Post, Page as well as Custom Post Types.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-taxonomy-for-users\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-taxonomy-for-users\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-taxonomy-for-users\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/wordpress-custom-taxonomy-for-users\\\/new-user-menu.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/wordpress-custom-taxonomy-for-users\\\/new-user-menu.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-taxonomy-for-users\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Register Custom Taxonomy For WordPress Users\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\",\"name\":\"Thoriq Firdaus\",\"description\":\"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.\",\"sameAs\":[\"https:\\\/\\\/thoriq.com\",\"https:\\\/\\\/x.com\\\/tfirdaus\"],\"jobTitle\":\"Web Developer\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/thoriq\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Register Custom Taxonomy For WordPress Users - Hongkiat","description":"The Custom Taxonomy feature has been introduced since WordPress 2.9. It allows you to create custom groups for Post, Page as well as Custom Post Types.","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:\/\/www.hongkiat.com\/blog\/wordpress-custom-taxonomy-for-users\/","og_locale":"en_US","og_type":"article","og_title":"How to Register Custom Taxonomy For WordPress Users","og_description":"The Custom Taxonomy feature has been introduced since WordPress 2.9. It allows you to create custom groups for Post, Page as well as Custom Post Types.","og_url":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-taxonomy-for-users\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2019-09-11T15:56:15+00:00","article_modified_time":"2022-10-18T12:12:09+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/wordpress-custom-taxonomy-for-users\/new-user-menu.jpg","type":"","width":"","height":""}],"author":"Thoriq Firdaus","twitter_card":"summary_large_image","twitter_creator":"@tfirdaus","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Thoriq Firdaus","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-taxonomy-for-users\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-taxonomy-for-users\/"},"author":{"name":"Thoriq Firdaus","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807"},"headline":"How to Register Custom Taxonomy For WordPress Users","datePublished":"2019-09-11T15:56:15+00:00","dateModified":"2022-10-18T12:12:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-taxonomy-for-users\/"},"wordCount":558,"commentCount":17,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-taxonomy-for-users\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/wordpress-custom-taxonomy-for-users\/new-user-menu.jpg","keywords":["ad-divi"],"articleSection":["WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/wordpress-custom-taxonomy-for-users\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-taxonomy-for-users\/","url":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-taxonomy-for-users\/","name":"How to Register Custom Taxonomy For WordPress Users - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-taxonomy-for-users\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-taxonomy-for-users\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/wordpress-custom-taxonomy-for-users\/new-user-menu.jpg","datePublished":"2019-09-11T15:56:15+00:00","dateModified":"2022-10-18T12:12:09+00:00","description":"The Custom Taxonomy feature has been introduced since WordPress 2.9. It allows you to create custom groups for Post, Page as well as Custom Post Types.","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-taxonomy-for-users\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/wordpress-custom-taxonomy-for-users\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-taxonomy-for-users\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/wordpress-custom-taxonomy-for-users\/new-user-menu.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/wordpress-custom-taxonomy-for-users\/new-user-menu.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-taxonomy-for-users\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Register Custom Taxonomy For WordPress Users"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807","name":"Thoriq Firdaus","description":"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.","sameAs":["https:\/\/thoriq.com","https:\/\/x.com\/tfirdaus"],"jobTitle":"Web Developer","url":"https:\/\/www.hongkiat.com\/blog\/author\/thoriq\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-5J6","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/22016","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/113"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=22016"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/22016\/revisions"}],"predecessor-version":[{"id":48673,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/22016\/revisions\/48673"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=22016"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=22016"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=22016"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=22016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}