{"id":19159,"date":"2019-02-16T18:06:22","date_gmt":"2019-02-16T10:06:22","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=19159"},"modified":"2022-10-18T20:12:14","modified_gmt":"2022-10-18T12:12:14","slug":"wordpress-custom-template-tags","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-template-tags\/","title":{"rendered":"How to Create Custom WordPress Template Tags"},"content":{"rendered":"<p>Building a <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.hongkiat.com\/blog\/go\/elegant\">WordPress Theme<\/a> is so easy with <strong>template tags<\/strong>. You can add <code>the_title()<\/code> to display the  post or page title, and you can use <code>the_content()<\/code> to display post or page contents. There are many more template tags in WordPress that we can use to <strong>display other things<\/strong>.<\/p>\n<p>But when it comes to <strong>displaying only particular things on your theme<\/strong>, you might want to <strong>create your own template tag<\/strong>. In today\u2019s tutorial, we are going to walk you through this not-too-complicated process. Let\u2019s get started with the fundamentals.<\/p>\n<p class=\"note\"><strong>Recommended Reading<\/strong> <a href=\"https:\/\/www.hongkiat.com\/blog\/wordpress-conditional-tags-beginners\/\">WordPress Conditional Tags (And Snippets) For Beginners<\/a><\/p>\n<h2>Basic Template Tag<\/h2>\n<p>If you take a look at <a href=\"https:\/\/core.trac.wordpress.org\/browser\/tags\/3.6.1\/wp-includes\/post-template.php#L0\" rel=\"nofollow\">the WordPress Core sources<\/a>, you will find that a template tag is basically <strong>a PHP function running a set of codes with some parameters<\/strong>.<\/p>\n<p>To create your own template tag, you can write a PHP function in functions.php within your theme directory, for example.<\/p>\n<pre>\r\nfunction my_template_tag() {\r\n\techo 'This is my template';\r\n}\r\n<\/pre>\n<p>Then, in your other theme files, say, <code>single.php<\/code> or <code>page.php<\/code>, you can add the function, like so.<\/p>\n<pre>\r\n&lt;?php my_template_tag() ;?&gt;\r\n<\/pre>\n<p>This will display the \u2018This is my template\u2019 that is echoed inside the <code>my_template_tag()<\/code> function.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/wordpress-custom-template-tags\/basic-template-tag.jpg?newedit\" alt=\"basic template tag\" width=\"500\" height=\"180\"><\/figure>\n<p>Creating a WordPress Template is really that simple. Alright, let us now take a look at a slightly more advanced example.<\/p>\n<h2>Page View Count Template Tag<\/h2>\n<p>In this example, we are going to create a template<strong> that will show view count<\/strong> for each post and page.<\/p>\n<p>First, <strong>install and activate WordPress.com Stat in <a href=\"https:\/\/jetpack.com\/\">Jetpack<\/a><\/strong>. And make sure that you have connected Jetpack to WordPress.com. The reason we use WordPress.com Stat is that the <strong>View<\/strong> data will be stored in WordPress.com rather than in our own database. This could save on our server load.<\/p>\n<p>Create a function in your <strong>functions.php<\/strong> named <code>the_view()<\/code>, like so:<\/p>\n<pre>\r\nfunction the_view() { \r\n\r\n}\t\r\n<\/pre>\n<p>We will put the function (the template tag) in a page or post, so we need to get the page and post ID number. This can be retrieved using <code>get_the_ID();<\/code>.<\/p>\n<pre>\r\nfunction the_view() { \r\n\t$id = get_the_ID();\r\n}\t\r\n<\/pre>\n<p>We can then use a function to retrieve the number of views from WordPress.com Stats by using <code>stats_get_csv();<\/code>. This function accepts several parameters ( find the complete list <a href=\"https:\/\/stats.wordpress.com\/csv.php\" rel=\"nofollow\">here<\/a>).<\/p>\n<p>In our case, we need to add the <code>days<\/code>, which specify the time range of the view count, and the <code>post_id<\/code>.<\/p>\n<pre>\r\nfunction the_view() {\r\n\t$id = get_the_ID();\r\n\t$page_view = stats_get_csv('postviews', 'days=-1&post_id='.$id.'');\r\n}\r\n<\/pre>\n<p>In the code above, since we set the <code>days<\/code> parameter to <code>-1<\/code>, we will retrieve the view count of the given post ID from the very beginning, from when the WordPress.com Stat plugin is activated.<\/p>\n<p>Once we\u2019ve the number, we just need to echo it, as follows.<\/p>\n<pre>\r\nfunction the_view() {\r\n\t$id = get_the_ID();\r\n\t$page_view = stats_get_csv('postviews', 'days=-1&post_id='.$id.'');\r\n\techo $page_view[0]['views'];\r\n}\r\n<\/pre>\n<p>That\u2019s it, our new template tag for displaying page view count is done. You can <code>&lt;?php the_view() ;?&gt;<\/code> anywhere in page.php or single.php. For example:<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/wordpress-custom-template-tags\/post-count-view.jpg?newedit\" alt=\"post count view\" width=\"500\" height=\"180\"><\/figure>\n<p>If you have any questions, please feel free to put them in the comment section below.<\/p>","protected":false},"excerpt":{"rendered":"<p>Building a WordPress Theme is so easy with template tags. You can add the_title() to display the post or page title, and you can use the_content() to display post or page contents. There are many more template tags in WordPress that we can use to display other things. But when it comes to displaying only&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,252],"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 Create Custom WordPress Template Tags - Hongkiat<\/title>\n<meta name=\"description\" content=\"Building a WordPress Theme is so easy with template tags. You can add the_title() to display the post or page title, and you can use the_content() to\" \/>\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-template-tags\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create Custom WordPress Template Tags\" \/>\n<meta property=\"og:description\" content=\"Building a WordPress Theme is so easy with template tags. You can add the_title() to display the post or page title, and you can use the_content() to\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-template-tags\/\" \/>\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-02-16T10:06:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-18T12:12:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/wordpress-custom-template-tags\/basic-template-tag.jpg?newedit\" \/>\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=\"3 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-template-tags\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-template-tags\\\/\"},\"author\":{\"name\":\"Thoriq Firdaus\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\"},\"headline\":\"How to Create Custom WordPress Template Tags\",\"datePublished\":\"2019-02-16T10:06:22+00:00\",\"dateModified\":\"2022-10-18T12:12:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-template-tags\\\/\"},\"wordCount\":454,\"commentCount\":15,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-template-tags\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/wordpress-custom-template-tags\\\/basic-template-tag.jpg?newedit\",\"keywords\":[\"ad-divi\",\"WordPress Tips\"],\"articleSection\":[\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-template-tags\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-template-tags\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-template-tags\\\/\",\"name\":\"How to Create Custom WordPress Template Tags - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-template-tags\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-template-tags\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/wordpress-custom-template-tags\\\/basic-template-tag.jpg?newedit\",\"datePublished\":\"2019-02-16T10:06:22+00:00\",\"dateModified\":\"2022-10-18T12:12:14+00:00\",\"description\":\"Building a WordPress Theme is so easy with template tags. You can add the_title() to display the post or page title, and you can use the_content() to\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-template-tags\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-template-tags\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-template-tags\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/wordpress-custom-template-tags\\\/basic-template-tag.jpg?newedit\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/wordpress-custom-template-tags\\\/basic-template-tag.jpg?newedit\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wordpress-custom-template-tags\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Create Custom WordPress Template Tags\"}]},{\"@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 Create Custom WordPress Template Tags - Hongkiat","description":"Building a WordPress Theme is so easy with template tags. You can add the_title() to display the post or page title, and you can use the_content() to","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-template-tags\/","og_locale":"en_US","og_type":"article","og_title":"How to Create Custom WordPress Template Tags","og_description":"Building a WordPress Theme is so easy with template tags. You can add the_title() to display the post or page title, and you can use the_content() to","og_url":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-template-tags\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2019-02-16T10:06:22+00:00","article_modified_time":"2022-10-18T12:12:14+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/wordpress-custom-template-tags\/basic-template-tag.jpg?newedit","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":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-template-tags\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-template-tags\/"},"author":{"name":"Thoriq Firdaus","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807"},"headline":"How to Create Custom WordPress Template Tags","datePublished":"2019-02-16T10:06:22+00:00","dateModified":"2022-10-18T12:12:14+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-template-tags\/"},"wordCount":454,"commentCount":15,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-template-tags\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/wordpress-custom-template-tags\/basic-template-tag.jpg?newedit","keywords":["ad-divi","WordPress Tips"],"articleSection":["WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/wordpress-custom-template-tags\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-template-tags\/","url":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-template-tags\/","name":"How to Create Custom WordPress Template Tags - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-template-tags\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-template-tags\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/wordpress-custom-template-tags\/basic-template-tag.jpg?newedit","datePublished":"2019-02-16T10:06:22+00:00","dateModified":"2022-10-18T12:12:14+00:00","description":"Building a WordPress Theme is so easy with template tags. You can add the_title() to display the post or page title, and you can use the_content() to","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-template-tags\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/wordpress-custom-template-tags\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-template-tags\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/wordpress-custom-template-tags\/basic-template-tag.jpg?newedit","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/wordpress-custom-template-tags\/basic-template-tag.jpg?newedit"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/wordpress-custom-template-tags\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Create Custom WordPress Template Tags"}]},{"@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-4Z1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/19159","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=19159"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/19159\/revisions"}],"predecessor-version":[{"id":63047,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/19159\/revisions\/63047"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=19159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=19159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=19159"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=19159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}