# Property Archive System Property listing and filtering system for the real estate website. ## Files | File | Purpose | |------|---------| | `property-filters.php` | Filter form UI (Type, Location, Beds, Price Range) | | `property-filters.js` | AJAX filtering without page reload | | `property-filters.scss` | Filter bar and map view styles | | `property-results.php` | Property grid with pagination | | `property-card.php` | Individual property card component | | `property-agent.php` | Agent sidebar widget on single property | ## Sorting Logic Properties are sorted by: 1. **Status**: Active first, Pending second, Sold third 2. **Modified Date**: Most recently modified first within each status group This sorting is handled in PHP via `homeproz_sort_properties_by_status()` in `inc/template-functions.php`. ## Filter Fields - **Type**: Taxonomy `property_type` (House, Land, Commercial, etc.) - **Location**: Taxonomy `property_location` (City names) - **Beds**: ACF field `bedrooms` (minimum bedrooms filter) - **Price Range**: ACF field `property_price` (min/max numeric filter) Status filter was removed - all properties (Active, Pending, Sold) are always shown. ## AJAX Handler `homeproz_ajax_filter_properties()` in `inc/ajax-handlers.php` - Receives filter params via POST - Returns HTML for `#property-results` container - Uses same sorting logic as initial page load ## Map View Toggle between Grid and Map views. Map view: - Uses Leaflet.js with OpenStreetMap tiles - City-based coordinates (no geocoding API) - Properties displayed in half-height map + 2-column grid