Restrict the location field to specific listing categories but keep in the search bar


Fabulous plugin, great job! I’ve applied the snippet below to restrict/hide maps. Works great but one question I have: The search bar on the home page also disables location. I would like to have th egeo location functionality in the general search bar. Any tips what to add to below snippet?


Thanks, glad you like it! Thanks! If you have a minute, please rate it on the WordPress repository: [HivePress - Business Directory & Classified Ads WordPress Plugin] Reviews | Any feedback is appreciated.

If you are familiar with coding or have a developer, the best option is to use the model hook on the listing and form, and the hook on the listing_update form, and check the categories there, hiding the fields, so it won’t affect the search bar. But please note that advanced custom implementations may be required.

Hi Andrii, thanks but im not into dev. tbh. Might need assistance here, should be an easy fix imo? If a code snippet is available or someone could assist?


Sorry, there’s no simple code snippet for this, it would require a custom implementation. If customizations beyond the available features are required for your site, please consider hiring someone for custom work

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.