acd606bb03
Major changes: - Property list now updates when map pans/zooms - Properties sorted by distance from map center (closest first) - Shows "X properties in view" when viewport filtering active - Min 30 properties required before grouping kicks in - Added rule to CLAUDE.md: no commits unless asked Backend: - MLS_Query: Added bounds filtering and distance-based sorting - AJAX handler: Accepts bounds/center, sorts by distance when provided Frontend: - Map move triggers property list refresh with same viewport - Loop prevention flag to avoid map->filter->map recursion - Resets to page 1 when viewport changes Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
58 lines
2.0 KiB
Markdown
Executable File
58 lines
2.0 KiB
Markdown
Executable File
# HomeProz WordPress Theme
|
|
|
|
Custom WordPress theme for HomeProz Real Estate (Albert Lea, MN). Dark/rust brand aesthetic with ACF-powered property listings.
|
|
|
|
## Development Rules
|
|
|
|
1. **No emojis** - nowhere in code, commits, docs, or conversation
|
|
2. **Tailwind CSS + SCSS** - compiled via Vite
|
|
3. **jQuery** - for all JS functionality
|
|
4. **Co-locate files** - SCSS/JS live alongside PHP templates
|
|
5. **Page-scoped styles** - wrap in `.Page_Class_Name { }`, early return in JS
|
|
6. **Server-side render** - no client-side templating
|
|
7. **No custom animations** - keep it static and fast
|
|
8. **ASK before architectural decisions**
|
|
9. **No git commits unless asked** - commits are for checkpoints before major work or major milestones, not for small single-file changes
|
|
|
|
## Build
|
|
|
|
```bash
|
|
cd wp-content/themes/homeproz
|
|
npm run build
|
|
```
|
|
|
|
## Tools
|
|
|
|
- **WP-CLI**: `wp --allow-root <command>`
|
|
- **Dev commits**: `./dev_commit.sh "message"` (includes DB snapshot)
|
|
|
|
## Theme Options
|
|
|
|
Access via `homeproz_get_option('key')`:
|
|
- `phone`, `email`, `address`, `facebook`, `tiktok`
|
|
|
|
## Custom Post Types
|
|
|
|
### Property (`/properties/`)
|
|
- ACF: price, address, beds/baths/sqft, gallery, documents, listing_agent
|
|
- Taxonomies: `property_status` (Active/Pending/Sold), `property_type`, `property_location`
|
|
- Location dropdown only shows communities with active/pending properties
|
|
|
|
### Agent (`/agents/`)
|
|
- ACF: phone, email, bio, gallery, social links, order, disabled toggle
|
|
- Disabled agents: 404 on profile, office contact on property cards
|
|
|
|
## Key Helpers
|
|
|
|
```php
|
|
// Get locations with active/pending properties only
|
|
$locations = homeproz_get_active_locations();
|
|
|
|
// Contact page with property inquiry prefill
|
|
$url = add_query_arg('property', urlencode($title), home_url('/contact/'));
|
|
```
|
|
|
|
## Page Classes
|
|
|
|
`Home_Page`, `Properties_Archive`, `Single_Property`, `About_Page`, `Contact_Page`, `Blog_Archive`, `Single_Post`, `Agents_Archive`, `Single_Agent`, `Search_Page`, `Error_404`
|