Replace ClassiPress Location Search field with a custom field dropdown

A detailed instruction on how to replace Location Search field with a custom field dropdown on your WordPress ClassiPress site.

The default ClassiPress search bar has three fields:

Search keywordsLocationCategories

The ClassiPress Location field needs to refine search results to some geographic location. It can use the Google Places API for a location autocomplete and radius search or it may take a simple string to compare against ads address fields.

The following mod replaces default location field with a States dropdown list and allows restricting search results to a specific state.

This method can be applied for any field of the drop-down or checkbox type, such as Country, Region, Size, Color, etc.

The mod should be made in the template file searchform-listing.php, so using a child theme is the preferable way to implement the change.

Create file searchform-listing.php in the root folder of the child theme.Add t…
Read more about Replace ClassiPress Location Search field with a custom field dropdown
  • 6