Remove location field from sidebar and under sort by selection

I want to know if it is possible to remove the Location input fields from below the sort by area and under the category area in sidebar.

Hi,

Thanks for the details. Please note that by default, the Location field is only displayed in the search bar and cannot be displayed in the filter or as a sorting option. Please clarify whether you added custom code to add this field or added it as a custom attribute.

Thanks for the speedy response.

I have added some PHP snippets I found on the community using the snippet plugin.

Most of the other changes I made. I used CSS.

1 Like

Hi,

I see. We recommend disabling all custom code and checking if the issue persists. Also, please note that we cannot help with custom code, as it is out of our support scope.

I have removed the code snippet that you provide in the forum posts here.

This problem still occurs.

In order to remove, I have had to use CSS display none to remove the location fields but it also removes the category list as well, which is above the filter button on the left section.

I do not want the categories to be removed.

Hi,

We recommend removing all custom implementations you have added to your website, disabling all third-party plugins, and caching for logged-in users. Also, please note that we cannot assist with debugging custom code, as this is outside the scope of our support.

I have removed everything as noted above as well as caching all users logged in but it still displays the location field.

I have found that this code snippet below which I found on your gist account(hivepress’s gists · GitHub) ,

.hp-field–hidden {
display: block !important;
}

If I change to display none. It removes the everything.

Is there no CSS that I can use that is specific for the location field.

Screenshot 2025-06-11 092621|690x331

Hi,

Please note that if you have disabled all third-party customizations, plugins, and cleared the cache, the location field should only appear in the search bar, as shown in this demo version.

Therefore, if this is the Location field that is automatically added by the Geolocation extension, you can completely remove it from your website by simply disabling the Geolocation extension in WP Dashboard > Plugins.

If you want to remove the location field from sort or filter, and this attribute was added via Geolocation, you need to remove the custom code or hide these fields using custom code.

Alternatively, if this attribute is added as a custom attribute in Listings > Attributes, you simply need to edit this attribute and disable the Filterable and Sortable features, then it will be removed from the filter and sort areas.

I hope it helps