{"id":10816353,"date":"2018-10-25T17:29:55","date_gmt":"2018-10-25T17:29:55","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/customize-membership-directory-search\/"},"modified":"2018-10-25T17:29:55","modified_gmt":"2018-10-25T17:29:55","slug":"customize-membership-directory-search","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/customize-membership-directory-search\/","title":{"rendered":"Customize Membership Directory Search"},"content":{"rendered":"<p>Hi! Great plugin.<\/p>\n<p>I&#8217;m wondering if there is a solution for this need:<\/p>\n<p>In my membership directories, there are a couple of custom search fields that are numerical. For example one is &#8220;Region&#8221;. These regions are defined in the database as numbers, but on the front end we&#8217;d like to allow searching by their common names eg. &#8220;South&#8221;, &#8220;North&#8221;. Obviously the region number equals a common name: 1 = South.<\/p>\n<p>Currently, when the user searches, they have to search using a number. We could always offer them a &#8220;key&#8221; printed on the page to elaborate what number equals what region, but the search will return region 10 when 1 is input in the search box (which is of course expected behavior on these particular search fields).<\/p>\n<p>Ideally, I&#8217;d like to do these things in order of preference:<\/p>\n<p>1.) Instead of typed search, is there anyway to present a drop down of the common names to search from? A drop down that presented North, South etc. This would in turn search the appropriate number?<\/p>\n<p>2.) If that&#8217;s not possible, can the search be performed as an exact match? So if someone searched Region &#8220;1&#8221; it would ONLY return region 1 and not also region 10?<\/p>\n<p>I&#8217;m open to using search filters as well as other plugins. Any advice appreciated!<\/p>\n","protected":false},"template":"","class_list":["post-10816353","topic","type-topic","status-publish","hentry","topic-tag-custom-field","topic-tag-dropdown","topic-tag-filter"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/10816353","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/10816353\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=10816353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}