{"id":732,"date":"2025-03-24T14:27:32","date_gmt":"2025-03-24T14:27:32","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/creating-different-templates-for-custom-post-types\/"},"modified":"2025-04-03T15:23:52","modified_gmt":"2025-04-03T14:23:52","slug":"creating-different-templates-for-custom-post-types","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/custom-post-types-extension\/creating-different-templates-for-custom-post-types\/","title":{"rendered":"Creating different templates for Custom Post Types"},"content":{"rendered":"<section class=\"alert alert-info\">\n\t You can create <strong>different page layouts<\/strong> for listings in <strong>different Custom Post Types<\/strong>.<\/section>\n<h2>Specific pages for listings<\/h2>\n<p>\n\t3 page templates are required for each Custom Post Type (for example Places, Events etc):<\/p>\n<ol>\n<li>GD Detail page<\/li>\n<li>GD Archive page<\/li>\n<li>GD Archive Item page<\/li>\n<\/ol>\n<p> <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/explore-settings\/settings-overview-for-general-pages\/\">You can edit those pages to create your preferred look and layout.<\/a><\/p>\n<h2>Creating different page templates<\/h2>\n<ol>\n<li><strong>Duplicate the page template<\/strong>, for example make a copy of the default GD Detail page and name it <strong>GD Event Detail<\/strong>.<\/li>\n<li><strong>Navigate to the settings<\/strong> for your Custom Post Type, for example <strong>Events &gt; Settings<\/strong>.<\/li>\n<li>Choose the <strong>General<\/strong> tab.<\/li>\n<li>Click the <strong>Show Advanced<\/strong> button.&nbsp;<\/li>\n<li>Select your new Detail page at <strong>Template Page Settings.<\/strong><\/li>\n<\/ol>\n<p>\n\t<img width=\"796\" height=\"394\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-b2ePlAw9nh.png\" class=\"attachment-large size-large\" alt=\"\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-b2ePlAw9nh.png 796w, https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-b2ePlAw9nh-300x148.png 300w, https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-b2ePlAw9nh-768x380.png 768w\" sizes=\"auto, (max-width: 796px) 100vw, 796px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can create different page layouts for listings in different Custom Post Types. Specific pages for listings 3 page templates are required for each Custom Post Type (for example Places, Events etc): GD Detail page GD Archive page GD Archive Item page You can edit those pages to create your preferred look and layout. Creating [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[573,450,559,560,561],"article\/categories":[213,423],"class_list":["post-732","gd_place","type-gd_place","status-publish","hentry","gd_place_tags-cpt","gd_place_tags-template","gd_place_tags-look-and-feel","gd_place_tags-layout","gd_place_tags-design","gd_placecategory-extensions-features","gd_placecategory-custom-post-types-extension"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/732","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/types\/gd_place"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/comments?post=732"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/732\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=732"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=732"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=732"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}