{"id":2594,"date":"2026-10-20T08:35:19","date_gmt":"2026-10-20T07:35:19","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/customize-geodirectory-search-bar\/"},"modified":"2026-10-20T08:39:38","modified_gmt":"2026-10-20T07:39:38","slug":"customize-geodirectory-search-bar","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/customize-geodirectory-search-bar\/","title":{"rendered":"How to customize the GeoDirectory search bar"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The GeoDirectory search bar is the GD &gt; Search block, widget or <code>&#091;gd_search&#093;<\/code> shortcode. Its settings control which fields show, and Advanced Search adds more fields if you need them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Hide the post type drop down<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The drop down for choosing Places, Events and so on only appears when more than one post type has listings. To remove it from a particular search bar, set a default post type and hide the selector:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-markup\">&#091;gd_search post_type=&#039;gd_event&#039; post_type_hide=&#039;1&#039;&#093;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In the block settings these are <em>Default Post Type<\/em> and <em>Hide Post Type Selector<\/em>. The selector stays on the search results page itself so visitors can switch.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Hide the near field or the keyword field<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use <em>Hide Near Search Input<\/em> (<code>hide_near_input=&#039;1&#039;<\/code>) or <em>Hide Main Search Input<\/em> (<code>hide_search_input=&#039;1&#039;<\/code>). On a location page you might hide the near field so people only search within that location:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-markup\">&#091;gd_search hide_near_input=&#039;1&#039;&#093;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can change the placeholder text for the near field at GeoDirectory &gt; Settings &gt; General &gt; Search.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Add filters such as dates or categories<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Fields like a category drop down, event dates or price ranges come from the Advanced Search add-on. See <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/advanced-search\/how-to-add-a-filter-to-the-main-search-bar\/\">How to Add a Filter to the Main Search Bar?<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Change the look<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The block has style settings for input size, borders, rounded corners and the button. For anything else, <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/advanced-search\/how-to-adjust-the-gd-search-bar-with-css\/\">How to Adjust the GD Search Bar with CSS<\/a> has ready made examples.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Most themes and the default GeoDirectory pages already include a search bar. Edit the page that holds it (for example the Archive page or Search Page at GeoDirectory &gt; Settings &gt; General &gt; Pages) to change its settings there.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The GeoDirectory search bar is the GD &gt; Search block, widget or &#091;gd_search&#093; shortcode. Its settings control which fields show, and Advanced Search adds more fields if you need them. Hide the post type drop down The drop down for choosing Places, Events and so on only appears when more than one post type has [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[213,422],"class_list":["post-2594","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-extensions-features","gd_placecategory-core-widgets"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2594","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=2594"}],"version-history":[{"count":1,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2594\/revisions"}],"predecessor-version":[{"id":2777,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2594\/revisions\/2777"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2594"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2594"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}