I have spent possibly more than 30 minutes tinkering around location field.
And judging according to the amount of forum posts asking to hide it, please add option to hide it and not require it right into the HivePress settings.
So far it seems to be working for me to install yet another WP plugin “Code Snippets” and add new PHP snippet with content:
Forgive me if I’m wrong, but it seems like there’s some confusion going on here. The code snippets you found/shared above are for removing, and making the Location field optional.
If the Location field isn’t relevant to you and your site, you can simply deactivate and uninstall the HivePress Geolocation extension.
Otherwise, please describe what it is you’re actually trying to achieve, and the staff or community members like myself will likely be able to point you in the right direction.
Thanks for your input, yes, I have been confused, possibly expected that there will be option to disable the field without plugin deactivation… I would still think that there should be such option.
After deactivating the HivePress Geolocation plugin and a custom snippet (for a field hiding..), field does not appear and there is no problem.
Thanks for the feature suggestion, we will consider implementing it.
At the moment, the location field is required by default. This is mainly because, when using the geolocation feature, users typically rely on location-based search to find listings. Making this field optional could reduce visibility and make it harder for users to discover certain listings. It is possible to make the field optional with a small code snippet if needed: Make the location field optional for listings #hivepress #geolocation · GitHub.
It also seems that your request may imply that you don’t need the location field at all, in that case, you could simply disable the Geolocation plugin. Could you please describe your specific use case in a bit more detail? This will help us better understand your needs and evaluate the feature request more accurately.
If you want to keep geolocation specific to certain content types (e.g., vendors, but hide it for listings), you can manage it in HivePress > Settings > Geolocation > Content Types.
Just for reference, you can explore solutions in several places: our knowledge base, the snippet collection (Gist), the AI assistant (please note it may occasionally be inaccurate), and the community forum.
Thank you both. In my case, I have used WP to install all free HivePress plugins, to see what this directory system can offer. Expecting that each part could then by enabled/disabled as needed (i mean inside settings, not by disabling WP plugins, i have not got that idea by myself at all until Chris mentioned that the Location is a plugin which can be disabled).
So in case of a location field, i ended up in a state where i have found myself spending 1,5 hour or more finding how it can be avoided, how profile form can be submit without it and then finally how that form can be avoided allowing directly listing submission after registration. These things workings was not entirely apparent to me and not easily solved. You have already explained in other topics how these things are supposed to work.
It’s always a good practice to start learning a new tool from the documentation, it usually covers most common use cases and helps build a solid foundation.
I’m glad things are now clarified. Wishing you all the best in building something great with HivePress.