{"id":2632,"date":"2026-10-20T08:35:23","date_gmt":"2026-10-20T07:35:23","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/simplify-search-bar\/"},"modified":"2026-10-20T08:40:18","modified_gmt":"2026-10-20T07:40:18","slug":"simplify-search-bar","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/how-tos\/simplify-search-bar\/","title":{"rendered":"How to simplify the GeoDirectory search bar"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The GD > Search widget, block and <code>&#091;gd_search&#093;<\/code> shortcode have settings to remove the parts of the search bar you don&#8217;t need. Open the widget or block settings and look in the Content group:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Default Post Type: the post type searched when the page loads.<\/li>\n\n\n\n<li>Hide Post Type Selector: removes the post type dropdown, so visitors always search the default post type. This and Default Post Type only appear when you have more than one post type.<\/li>\n\n\n\n<li>Hide Main Search Input: removes the keyword box.<\/li>\n\n\n\n<li>Hide Near Search Input: removes the location box.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">As a shortcode, a search for Places with only the keyword box looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-php\">&#091;gd_search post_type=&quot;gd_place&quot; post_type_hide=&quot;1&quot; hide_near_input=&quot;1&quot;&#093;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you hide both the keyword box and the near box, a search returns every listing in the post type. For that kind of browsing the <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/gd-categories\/\">GD > Categories<\/a> widget usually works better, because it links straight to each category.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Add a category dropdown or other filters<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Advanced Search add-on lets you add the category field, or any other custom field, to the main search bar. 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\">Search around the visitor&#8217;s position<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When visitors click into the near box they can pick Near: My Location to search around where they are. The radius used for near searches is set at GeoDirectory > Settings > General > Search > Search near radius. It accepts decimals down to 0.1, so a small town directory can use a radius well under one mile or km. The unit comes from the Search distances setting on the same page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Location Manager add-on also has a separate near me button. See <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/location-manager\/gd-near-me-button\/\">GD > Near Me Button<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The GD > Search widget, block and &#091;gd_search&#093; shortcode have settings to remove the parts of the search bar you don&#8217;t need. Open the widget or block settings and look in the Content group: As a shortcode, a search for Places with only the keyword box looks like this: If you hide both the keyword [&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-2632","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\/2632","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=2632"}],"version-history":[{"count":1,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2632\/revisions"}],"predecessor-version":[{"id":2789,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2632\/revisions\/2789"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2632"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2632"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2632"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}