Real Estate Website - search by radius and database work
We are creating a real estate site in wordpress. We have a theme in place which allows users of the site to search for properties or submit properties.
There is a 'search by location' feature in the theme which allows a user to search for a property within a defined location. This location is set in the wp-admin within in the General Settings of the WP Theme and it searches through a custom field called 'add_location'.
Users can submit listings to the site via a submit page, where there is a dropdown labeled 'Location'. This shows the same locations as I have just described and stores the users selection in the custom field.
We require the following modifications:
1) In wordpress admin we need a new area called 'Schools' where we can add/edit/delete the 'schools'. We will require the following fields; School Name, School Address.
The School Name field should auto populate the Location field within the General Settings of the WP Theme. Currently data in this field is manually entered.
2) On front end users can submit a property via a Submit Property link. When a user selects a Location from the dropdown on the submission page (which is populated by the School Name as defined in section (1)), we need the address of the propertie they have entered to be checked to see if it is within 5 miles from the Location that they have selected. (In other words, the address they have entered must be checked to see if it is within 5 miles of the school address.) If it is not, a warning message should be displayed and they will not be permitted to submit their listing. If it is within 5 miles they will be allowed to submit their listing for review.