{"id":2589,"date":"2026-10-20T08:35:19","date_gmt":"2026-10-20T07:35:19","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/add-view-details-button-to-listings\/"},"modified":"2026-10-20T08:39:38","modified_gmt":"2026-10-20T07:39:38","slug":"add-view-details-button-to-listings","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/how-tos\/add-view-details-button-to-listings\/","title":{"rendered":"How to add a &#8220;View details&#8221; button to GeoDirectory listings"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">On GeoDirectory archive pages the listing title and image already link to the listing. If you want a clear button as well, add a GD &gt; Post Badge to the archive item template and point its link at the listing URL.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to GeoDirectory &gt; Settings &gt; General &gt; Pages and open the page set as <em>Archive item page<\/em>.<\/li>\n\n\n\n<li>Add a GD &gt; Post Badge block (or shortcode) where you want the button.<\/li>\n\n\n\n<li>Set the field key to Title and the condition to <em>is not empty<\/em>, so the badge shows on every listing.<\/li>\n\n\n\n<li>Enter your button text in <em>Badge<\/em>, for example View details.<\/li>\n\n\n\n<li>In the Click Action settings, set <em>Link url<\/em> to <code>%%post_url%%<\/code>.<\/li>\n\n\n\n<li>Pick a colour or set your own background and text colours, then update the page.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">As a shortcode it looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-markup\">&#091;gd_post_badge key=&#039;post_title&#039; condition=&#039;is_not_empty&#039; badge=&#039;View details&#039; link=&#039;%%post_url%%&#039; bg_color=&#039;#0073aa&#039; txt_color=&#039;#ffffff&#039;&#093;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Use the read more link instead<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">GD &gt; Post Content can end the excerpt with a link to the listing. The link only appears when you also set a word limit or a max height, so include one of them:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-markup\">&#091;gd_post_content key=&#039;post_content&#039; limit=&#039;30&#039; read_more=&#039;View details&#039;&#093;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">More examples are in <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/gd-post-badge\/\">GD &gt; Post Badge<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On GeoDirectory archive pages the listing title and image already link to the listing. If you want a clear button as well, add a GD &gt; Post Badge to the archive item template and point its link at the listing URL. As a shortcode it looks like this: Use the read more link instead GD [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[211,432],"class_list":["post-2589","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\/2589","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=2589"}],"version-history":[{"count":1,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2589\/revisions"}],"predecessor-version":[{"id":2772,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2589\/revisions\/2772"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2589"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2589"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}