{"id":2950,"date":"2026-10-20T08:40:00","date_gmt":"2026-10-20T07:40:00","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/customize-listing-detail-page-2\/"},"modified":"2026-10-20T08:40:00","modified_gmt":"2026-10-20T07:40:00","slug":"customize-listing-detail-page-2","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/how-tos\/customize-listing-detail-page-2\/","title":{"rendered":"How to customize the GeoDirectory listing detail page"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The single listing page in GeoDirectory is built from a normal WordPress page, the details template page. You change the layout by editing that page with blocks or shortcodes, and you rarely need to copy PHP template files into your theme.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Edit the details template page<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to GeoDirectory > Settings > General > Pages and look at Details Page under Template Page Settings. A post type can use its own page, set in Places > Settings > General.<\/li>\n\n\n\n<li>Open that page in your editor.<\/li>\n\n\n\n<li>Add, remove and rearrange GeoDirectory blocks such as GD > Post Images, GD > Single Tabs, GD > Post Meta, GD > Map and GD > Post Badge.<\/li>\n\n\n\n<li>Update the page and view a listing to check the result.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">These are template blocks: they show the data of whichever listing is being viewed. See <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/what-is-a-template-widget\/\">what is a template widget<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Choose which fields show<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Fields are managed in Places > Settings > Custom Fields. Add new fields there, and use each field&#8217;s &#8220;Show in extra output location&#8221; setting to decide where it appears, for example on the detail page sidebar or in its own tab. The tabs on the listing page are arranged in Places > Settings > Tabs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To place one field exactly where you want it, use GD > Post Meta:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-markup\">&#091;gd_post_meta key=&quot;your_field_key&quot;&#093;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Add a booking button<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Add a URL field, for example with the key <code>booking_url<\/code>, then use GD > Post Badge to show it as a button only when the field has a value:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-markup\">&#091;gd_post_badge key=&quot;booking_url&quot; condition=&quot;is_not_empty&quot; badge=&quot;Book now&quot; link=&quot;%%input%%&quot; new_window=&quot;1&quot;&#093;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Sidebars<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Your theme&#8217;s sidebar can hold any widgets. Template blocks such as GD > Post Meta also work in a sidebar on the detail page.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Overriding template files<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For changes blocks cannot make, copy a file from the plugin&#8217;s <code>templates<\/code> folder into a <code>geodirectory<\/code> folder in your child theme and edit the copy. See <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/how-tos\/customizing-templates\/\">customizing templates<\/a>. Copied files need checking after GeoDirectory updates.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The single listing page in GeoDirectory is built from a normal WordPress page, the details template page. You change the layout by editing that page with blocks or shortcodes, and you rarely need to copy PHP template files into your theme. Edit the details template page These are template blocks: they show the data of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[211,432],"class_list":["post-2950","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-tips-tricks-more","gd_placecategory-how-tos"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2950","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"}],"author":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/comments?post=2950"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2950\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2950"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2950"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2950"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}