{"id":2363,"date":"2026-10-20T08:32:19","date_gmt":"2026-10-20T07:32:19","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/add-book-an-appointment-button\/"},"modified":"2026-10-20T08:40:21","modified_gmt":"2026-10-20T07:40:21","slug":"add-book-an-appointment-button","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/how-tos\/add-book-an-appointment-button\/","title":{"rendered":"How to add a &#8220;Book an appointment&#8221; button to listings"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Add a URL field for the booking link, then show it as a button with the GD > Post Badge block. Each listing gets its own booking link, and the button only appears on listings that have one.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. Add a booking link field<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to Places > Settings > Custom Fields.<\/li>\n\n\n\n<li>Add a URL field. Give it a label such as &#8220;Booking link&#8221; and the key <code>booking_url<\/code>.<\/li>\n\n\n\n<li>Save. Listing owners can now fill it in on the add listing form.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">2. Show it as a button<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Edit your details page template and add a GD > Post Badge block where you want the button, or use this shortcode:<\/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 an appointment&quot; icon_class=&quot;far fa-calendar-check&quot; link=&quot;%%input%%&quot; new_window=&quot;1&quot; color=&quot;primary&quot; size=&quot;h4&quot;&#093;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>%%input%%<\/code> is replaced with the listing&#8217;s booking link. Change the colour, size and alignment in the block&#8217;s Design settings. <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/gd-post-badge\/\">GD > Post Badge<\/a> lists all options.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If every listing should go to the same booking page, put that address in the link instead of <code>%%input%%<\/code> and use a field every listing has, such as <code>post_title<\/code>, as the key.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Taking bookings on your own site<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you want visitors to book and pay on your site rather than follow a link, look at the <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/booking-appointments\/booking-appointments-setup-guide\/\">Booking Appointments<\/a> add-on.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Add a URL field for the booking link, then show it as a button with the GD > Post Badge block. Each listing gets its own booking link, and the button only appears on listings that have one. 1. Add a booking link field 2. Show it as a button Edit your details page template [&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-2363","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\/2363","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=2363"}],"version-history":[{"count":2,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2363\/revisions"}],"predecessor-version":[{"id":2649,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2363\/revisions\/2649"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2363"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2363"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2363"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}