{"id":2479,"date":"2026-10-20T08:34:08","date_gmt":"2026-10-20T07:34:08","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/show-business-hours-on-listings\/"},"modified":"2026-10-20T08:38:59","modified_gmt":"2026-10-20T07:38:59","slug":"show-business-hours-on-listings","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/how-tos\/show-business-hours-on-listings\/","title":{"rendered":"How to show business hours on listings and use 12 hour times"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Business hours show on GeoDirectory listings once the post type has the Business Hours field. Without that field there is nothing to enter or display.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Add the Business Hours field<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to Places &gt; Settings &gt; Custom Fields (or the Settings page of your other post type).<\/li>\n\n\n\n<li>In the Predefined Fields list, click Business Hours to add it to the form.<\/li>\n\n\n\n<li>Open the field to check its settings, then save.<\/li>\n\n\n\n<li>Edit a listing and fill in its opening hours.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Where the hours appear<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The default Archive item template includes <code>&#091;gd_post_meta key=&#039;business_hours&#039; location=&#039;listing&#039;&#093;<\/code>, so the hours show on each listing card on category and search pages. If you have changed that template and the hours are missing, add the shortcode back in, or the GD &gt; Post Meta block with the key set to business_hours.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On the details page, use the field&#8217;s &#8220;Show in extra output location&#8221; setting to show it in the details page sidebar, or add the same <code>gd_post_meta<\/code> shortcode to the details template.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Use 12 hour times instead of 24 hour<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">GeoDirectory uses the WordPress time format for business hours, both in the time picker on the add listing form and in the output. Go to Settings &gt; General in WordPress and set Time Format to a 12 hour format such as <code>g:i a<\/code> (for example 2:30 pm), then save.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you want the form to use a different format from the rest of the site, developers can change only the input format with the <code>geodir_business_hours_input_time_format<\/code> filter:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-php\">add_filter( &#039;geodir_business_hours_input_time_format&#039;, function( $format ) {\n\treturn &#039;g:i a&#039;;\n} );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Time zones and other business hours settings are covered in <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/how-tos\/how-to-set-business-hours-and-time-zone\/\">how to set business hours and time zone<\/a>. To show only Open or Closed on your lists, see <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/code-snippets\/how-to-replace-business-hours-with-open-closed-on-gd-archives\/\">how to replace business hours with Open\/Closed<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Business hours show on GeoDirectory listings once the post type has the Business Hours field. Without that field there is nothing to enter or display. Add the Business Hours field Where the hours appear The default Archive item template includes &#091;gd_post_meta key=&#039;business_hours&#039; location=&#039;listing&#039;&#093;, so the hours show on each listing card on category and search [&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-2479","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\/2479","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=2479"}],"version-history":[{"count":1,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2479\/revisions"}],"predecessor-version":[{"id":2557,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2479\/revisions\/2557"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2479"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2479"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}