{"id":735,"date":"2025-03-24T14:27:32","date_gmt":"2025-03-24T14:27:32","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/gd-search\/"},"modified":"2025-04-03T15:23:53","modified_gmt":"2025-04-03T14:23:53","slug":"gd-search","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/gd-search\/","title":{"rendered":"GD > Search"},"content":{"rendered":"<p>The GD &gt; Search widget shows the GeoDirectory search bar. The search bar can be used search listings created with GeoDirectory.<\/p>\n<section class=\"alert alert-success dashed\">\n\t All Widgets come as Widgets, Shortcodes or Blocks. Learn more about our <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/what-makes-geodirectory-widgets-special\/\">Super Duper Widgets<\/a>.<\/section>\n<ul>\n<li>The icons inside the search boxes can be used to clear the current values.<\/li>\n<li>The Near input can be used to filter listings closest to the position entered such as a zip code or place name.<\/li>\n<li><strong>With the Advanced Search Extension<\/strong>, you can add custom field filters to the main search bar or to the advanced search section (see example section).<\/li>\n<\/ul>\n<h2>Widget Options<\/h2>\n<p> <em>This image shows the widget configuration with the Advanced Options revealed.<\/em><\/p>\n<p><em><img width=\"578\" height=\"595\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-H1F5hNvpYa.png\" class=\"attachment-large size-large\" alt=\"\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-H1F5hNvpYa.png 578w, https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-H1F5hNvpYa-291x300.png 291w\" sizes=\"auto, (max-width: 578px) 100vw, 578px\" \/><\/em><\/p>\n<p><em style=\"background-color: initial;\"><strong>Default Post Type&nbsp;<\/strong><\/em><\/p>\n<p>Choose which post type should be selected by default. This setting will have an effect when the search bar is used on a normal WP Page, the Location page, or the search results page. On CPT Archives this setting will be overridden&nbsp;to select the CPT of the archive.<\/p>\n<p><strong>Hide Post Type Selector<\/strong><\/p>\n<p>This settings will have an effect on a normal WP Page, or the location page or CPT Archives. The setting will have no effect when used on the search results page because hiding the post type select would make it impossible to search for other post types that are active on the site.<\/p>\n<p><strong>Open Customize Filters<\/strong><\/p>\n<p><em>Default<\/em> &#8211; Filters are closed until the user opens them to adjust the options.<br \/><em>Open when searched<\/em> &#8211; Leave the filters open on the search results page when filters are active.<br \/><em>Always open<\/em> &#8211; The filters will stay open all the time, whether or not they are in use.<\/p>\n<section class=\"alert alert-warning\">\n<h2>Extensions<\/h2>\n<p>\t If more than one CPT is detected then the below options will show.<\/p>\n<ul>\n<li><strong>Default Post Type<\/strong> &#8211; The custom post type to show by default. Only used when there are multiple CPTs.<\/li>\n<li><strong>Hide Post Type Selector<\/strong> &#8211;&nbsp;Hide the CPT selector (if not on the search page) this can be used to setup a specific CPT search and not give the option to change the CPT.<\/li>\n<\/ul>\n<p>\t If the <strong>Advanced Search<\/strong> extension is installed the below option will show.<\/p>\n<ul>\n<li><strong>Open advanced filters<\/strong> &#8211;&nbsp;Select when open \/ hide advanced filters. Options are; <strong>Default, Open when searched, always open.<\/strong><\/li>\n<\/ul>\n<\/section>\n<h2>Example Output<\/h2>\n<p>\n\t Default output<\/p>\n<p>\n\t<img width=\"619\" height=\"99\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-MjuRo8cKB4.png\" class=\"attachment-large size-large\" alt=\"\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-MjuRo8cKB4.png 619w, https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-MjuRo8cKB4-300x48.png 300w\" sizes=\"auto, (max-width: 619px) 100vw, 619px\" \/><\/p>\n<p>\n\t Example with multiple custom post types and advanced search options closed.<\/p>\n<p>\n\t<img width=\"721\" height=\"94\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-StObM3CFkU.png\" class=\"attachment-large size-large\" alt=\"\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-StObM3CFkU.png 721w, https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-StObM3CFkU-300x39.png 300w\" sizes=\"auto, (max-width: 721px) 100vw, 721px\" \/><\/p>\n<p>\n\t Example with advanced search filters open<\/p>\n<p>\n\t<img width=\"721\" height=\"590\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-PDpjoALj0U.png\" class=\"attachment-large size-large\" alt=\"\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-PDpjoALj0U.png 721w, https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-PDpjoALj0U-300x245.png 300w\" sizes=\"auto, (max-width: 721px) 100vw, 721px\" \/><\/p>\n<h2>What happens if&nbsp;a user types in the Search field and hits Search without waiting for the suggestions?&nbsp;<\/h2>\n<p>\n\t That is known as&nbsp; <strong>&#8216;Near Search&#8217;. <\/strong>In this case,&nbsp;the text entered in the search field is sent to your maps provider &#8211; either Google or OSM &#8212; and then a coordinate set is returned.<\/p>\n<p>\t Thereafter, your site&#8217;s database of locations is searched, for the radius from that point &#8211; and then the results are shown.<\/p>\n<p>\n\t Optionally, you can change the Near Search radius by heading to <strong>GD &gt; Settings &gt; General &gt; Search &gt; Search Near Radius <\/strong>and then incrementing the value accordingly (the number denotes miles\/kilometres, and a lower value yields faster results).&nbsp;<\/p>\n<p>\n\t<img width=\"632\" height=\"589\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-QNd6Vmo1Cv.png\" class=\"attachment-large size-large\" alt=\"\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-QNd6Vmo1Cv.png 632w, https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-QNd6Vmo1Cv-300x280.png 300w\" sizes=\"auto, (max-width: 632px) 100vw, 632px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The GD &gt; Search widget shows the GeoDirectory search bar. The search bar can be used search listings created with GeoDirectory. All Widgets come as Widgets, Shortcodes or Blocks. Learn more about our Super Duper Widgets. The icons inside the search boxes can be used to clear the current values. The Near input can be [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[574,575],"article\/categories":[213,422],"class_list":["post-735","gd_place","type-gd_place","status-publish","hentry","gd_place_tags-search","gd_place_tags-search-results","gd_placecategory-extensions-features","gd_placecategory-core-widgets"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/735","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"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/comments?post=735"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/735\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=735"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=735"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}