{"id":8675,"date":"2019-04-16T22:43:46","date_gmt":"2019-04-17T05:43:46","guid":{"rendered":"http:\/\/alannarisse.com\/blog\/?p=8675"},"modified":"2019-04-16T22:43:49","modified_gmt":"2019-04-17T05:43:49","slug":"wordpress-custom-post-type-template-not-rendering","status":"publish","type":"post","link":"https:\/\/www.alannarisse.com\/blog\/wordpress-custom-post-type-template-not-rendering\/","title":{"rendered":"WordPress custom post type template not rendering"},"content":{"rendered":"\n<p>I&#8217;m working on a site for a client and ran into an issue with getting the permalink to render the template I&#8217;d created. So I search the web and found this gem: When you&#8217;re messing with custom post types and change something structural like the slug, you may need to paste <code><code><code><code>&lt;?php flush_rewrite_rules(); ?><\/code><\/code><\/code><\/code> into the body of a template file. I added it to my header.php file in order to well&#8230; flush things out. Remember to REMOVE IT IMMEDIATELY after. It&#8217;s expensive.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><a href=\"https:\/\/wordpress.stackexchange.com\/questions\/156978\/custom-post-type-single-page-returns-404-error\/156985#156985?newreg=35b5bddcad0148d7b69fe4980c8f7598?\">Thank you WordPress Stack Exchange Community!<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m working on a site for a client and ran into an issue with getting the permalink to render the template I&#8217;d created. So I search the web and found this gem: When you&#8217;re messing with custom post types and change something structural like the slug, you may need to paste &lt;?php flush_rewrite_rules(); ?> into [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-8675","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.alannarisse.com\/blog\/wp-json\/wp\/v2\/posts\/8675","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.alannarisse.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.alannarisse.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.alannarisse.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.alannarisse.com\/blog\/wp-json\/wp\/v2\/comments?post=8675"}],"version-history":[{"count":1,"href":"https:\/\/www.alannarisse.com\/blog\/wp-json\/wp\/v2\/posts\/8675\/revisions"}],"predecessor-version":[{"id":8676,"href":"https:\/\/www.alannarisse.com\/blog\/wp-json\/wp\/v2\/posts\/8675\/revisions\/8676"}],"wp:attachment":[{"href":"https:\/\/www.alannarisse.com\/blog\/wp-json\/wp\/v2\/media?parent=8675"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.alannarisse.com\/blog\/wp-json\/wp\/v2\/categories?post=8675"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.alannarisse.com\/blog\/wp-json\/wp\/v2\/tags?post=8675"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}