{"id":745,"date":"2025-03-24T14:27:34","date_gmt":"2025-03-24T14:27:34","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/how-to-add-a-filter-to-the-main-search-bar\/"},"modified":"2025-04-03T15:23:54","modified_gmt":"2025-04-03T14:23:54","slug":"how-to-add-a-filter-to-the-main-search-bar","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/advanced-search\/how-to-add-a-filter-to-the-main-search-bar\/","title":{"rendered":"How to Add a Filter to the Main Search Bar?"},"content":{"rendered":"<p>\n\tAdd a filter to GeoDirectory&#8217;s&nbsp;<strong>main search bar.<\/strong>&nbsp;You can add any Select type field to the search bar.<\/p>\n<section class=\"alert alert-warning\">\n\t You need to have the <a href=\"https:\/\/wpgeodirectory.com\/downloads\/advanced-search-add-on\/\">Advanced Search Filters<\/a> extension installed and activated to access these options.<\/section>\n<p>\n\t You need to access <strong>CPT &gt; Settings &gt; Search (tab) <\/strong>section to add fields to the Advanced Search Filters. For instance, this guide uses the <strong>Places <\/strong>CPT. You can select fields that can be added to main search bar therein.<\/p>\n<h2>Adding Filters to the Main Search Bar<\/h2>\n<div>\n<p>\n\t\t<img width=\"920\" height=\"388\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-YahcChHxN7-1024x432.png\" class=\"attachment-large size-large\" alt=\"\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-YahcChHxN7-1024x432.png 1024w, https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-YahcChHxN7-300x127.png 300w, https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-YahcChHxN7-768x324.png 768w, https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-YahcChHxN7.png 1296w\" sizes=\"auto, (max-width: 920px) 100vw, 920px\" \/>\n\t<\/p>\n<\/div>\n<dl>\n<dt>\n\t1\n\t<\/dt>\n<dd>\n\tNavigate to <strong>CPT &gt; Settings &gt; Search (tab). <\/strong>You will find two columns &#8212; the <strong>left column <\/strong>has available fields, whereas the <strong>right column <\/strong>has active fields in the form.&nbsp;\n\t<\/dd>\n<section class=\"alert alert-info\">\n<p>\t\t You can find details about the Search tab on <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/advanced-search\/settings-overview-for-cpt-settings-search\/\">Settings Overview<\/a> page.<br \/>\n\t<\/section>\n<dt>\n\t2\n\t<\/dt>\n<dd>\n\tClick on the field that you wish to add. It will be added to the right column. You need to <strong>save each field<\/strong> before adding a new one.&nbsp;\n\t<\/dd>\n<dt>\n\t3\n\t<\/dt>\n<dd>Place a check next to the&nbsp;&nbsp;<strong>Show in Main Search Bar option.&nbsp;<\/strong>Fields with this option can be added to the search bar. Fields that can only be added to the main filter drawer will not have this checkbox.<\/dd>\n<\/dl>\n<section class=\"alert alert-info\">\n\t If added to main search bar, that particular field will not show up in the advanced search form.&nbsp;<\/section>\n<h2>List of Supported Fields for Main Search Bar<\/h2>\n<p>\n\t Following fields can be added to main search bar:&nbsp;<\/p>\n<ul>\n<li>Category (post_category)<\/li>\n<li>Video (video)<\/li>\n<li>Special Offers (special_offers)<\/li>\n<li>Price (price)<\/li>\n<li>Property Status (property_status)<\/li>\n<li>Property Type (property_type)<\/li>\n<li>Property Bedrooms (property_bedrooms)<\/li>\n<li>Property Bathrooms (property_bathrooms)<\/li>\n<li>Furnishing (property_furnishing)<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Add a filter to GeoDirectory&#8217;s&nbsp;main search bar.&nbsp;You can add any Select type field to the search bar. You need to have the Advanced Search Filters extension installed and activated to access these options. You need to access CPT &gt; Settings &gt; Search (tab) section to add fields to the Advanced Search Filters. For instance, this [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[587,541,566,586],"article\/categories":[213,400],"class_list":["post-745","gd_place","type-gd_place","status-publish","hentry","gd_place_tags-main-search-bar","gd_place_tags-geodirectory-addons","gd_place_tags-advanced-search","gd_place_tags-adding-fields-to-main-search-bar","gd_placecategory-extensions-features","gd_placecategory-advanced-search"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/745","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=745"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/745\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=745"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=745"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}