{"id":17367,"date":"2020-05-21T12:32:42","date_gmt":"2020-05-21T12:32:42","guid":{"rendered":"https:\/\/ampforwp.com\/tutorials\/?post_type=ht_kb&#038;p=17367"},"modified":"2020-05-21T12:38:14","modified_gmt":"2020-05-21T12:38:14","slug":"how-to-override-tag-template-in-amp","status":"publish","type":"ht_kb","link":"https:\/\/ampforwp.com\/tutorials\/article\/how-to-override-tag-template-in-amp\/","title":{"rendered":"How to override Tag Template in AMP"},"content":{"rendered":"\n<p>The following are the steps to override Tag\u00a0Template in AMP<\/p>\n\n\n\n<p><strong>Step 1:<\/strong><\/p>\n\n\n\n<p>Create a folder named \u201c<strong>ampforwp<\/strong>\u201d in your theme which you are currently using.<\/p>\n\n\n\n<p>e.g: if you are using twenty seventeen theme then you have to create ampforwp&nbsp;folder in the twenty seventeen theme folder<\/p>\n\n\n\n<p>The directory will look like<\/p>\n\n\n\n<p>ex:wp-content\/themes\/twenty seventeen\/ampforwp<\/p>\n\n\n\n<p>Tag: tag.php<\/p>\n\n\n\n<p><strong>Step 2:<\/strong><\/p>\n\n\n\n<p>Add the file which you want to override in this folder.<\/p>\n\n\n\n<p>For example: If you want to override all pages then you have to create  tag.php add your page.php in this folder and it will override the  tag.php \u00a0of your AMP and if you want to override only the specific tag then you need to add post name or ID of that tag file like \u2013<\/p>\n\n\n\n<p> <code>tag-{$slug_decoded}.php<\/code><br>tag-{$tag->slug}.php<br><code>tag-{$tag->term_id}.php<\/code> <\/p>\n\n\n\n<p><strong>That\u2019s it for this tutorial!<\/strong><\/p>\n\n\n\n<p>We hope it helped you. If you have any feedback or questions, then please share them in the comments section below.<\/p>\n<div id=\"div-1\" class=\"hkb-feedback\">\n\t\t\t<strong class=\"ht-mobile-exit__title\">Ask your Questions Directly!<\/strong><br>\n\t\t\t<div class=\"hkb_widget_exit__content\" style=\"font-size: 14px;\">If you can't find the solutions in this article, then just ask us in the comments and we will answer it for you!<\/div>\n\t\t\t<a href=\"https:\/\/ampforwp.com\/support\/#contact\" id=\"button\" target=\"_blank\" rel=\"noopener noreferrer\"><button>Yes, I have a Question<\/button><\/a>\n\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>The following are the steps to override Tag\u00a0Template in AMP Step 1: Create a folder named \u201campforwp\u201d in your theme which you are currently using. e.g: if you are using twenty seventeen theme then you have to create ampforwp&nbsp;folder in the twenty seventeen theme folder The directory will look like&#8230;<\/p>\n","protected":false},"author":18,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":[],"ht-kb-category":[186],"ht-kb-tag":[],"_links":{"self":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/17367"}],"collection":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/comments?post=17367"}],"version-history":[{"count":5,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/17367\/revisions"}],"predecessor-version":[{"id":17407,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/17367\/revisions\/17407"}],"wp:attachment":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/media?parent=17367"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-category?post=17367"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-tag?post=17367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}