Update CLAUDE.md with CPT, ACF, and feature documentation
- Added Agent CPT to theme structure and page class reference - Documented Property CPT with all ACF fields and taxonomies - Documented Agent CPT with ACF fields and disabled behavior - Added Theme Options (ACF Options Page) documentation - Documented contact page property inquiry feature - Updated open decisions (Agents decision resolved) - Updated notes section 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -260,8 +260,8 @@ themes/homeproz/
|
|||||||
│ └── tailwind.css # Tailwind imports
|
│ └── tailwind.css # Tailwind imports
|
||||||
├── dist/ # Vite build output
|
├── dist/ # Vite build output
|
||||||
├── inc/
|
├── inc/
|
||||||
│ ├── acf-fields.php
|
│ ├── acf-fields.php # All ACF field definitions
|
||||||
│ ├── custom-post-types.php
|
│ ├── custom-post-types.php # Property & Agent CPTs
|
||||||
│ ├── enqueue.php
|
│ ├── enqueue.php
|
||||||
│ ├── theme-setup.php
|
│ ├── theme-setup.php
|
||||||
│ └── template-functions.php
|
│ └── template-functions.php
|
||||||
@@ -277,20 +277,32 @@ themes/homeproz/
|
|||||||
│ │ ├── property-card.scss
|
│ │ ├── property-card.scss
|
||||||
│ │ ├── property-filters.php
|
│ │ ├── property-filters.php
|
||||||
│ │ ├── property-filters.js
|
│ │ ├── property-filters.js
|
||||||
│ │ └── property-filters.scss
|
│ │ ├── property-filters.scss
|
||||||
|
│ │ ├── property-gallery.php
|
||||||
|
│ │ ├── property-gallery.js
|
||||||
|
│ │ ├── property-gallery.scss
|
||||||
|
│ │ ├── property-agent.php # Agent card for property sidebar
|
||||||
|
│ │ └── single-property.scss
|
||||||
|
│ ├── agent/
|
||||||
|
│ │ ├── single-agent.scss
|
||||||
|
│ │ └── archive-agent.scss
|
||||||
│ └── components/
|
│ └── components/
|
||||||
│ ├── agent-card.php
|
│ ├── hero-section.php
|
||||||
│ ├── agent-card.scss
|
│ ├── hero-section.scss
|
||||||
|
│ ├── cta-section.php
|
||||||
|
│ ├── cta-section.scss
|
||||||
│ └── ...
|
│ └── ...
|
||||||
├── patterns/
|
├── patterns/
|
||||||
├── front-page.php
|
├── front-page.php
|
||||||
├── page.php
|
├── page.php
|
||||||
├── page-about.php
|
├── page-about.php
|
||||||
├── page-contact.php
|
├── page-contact.php # Supports ?property= prefill
|
||||||
├── archive.php
|
├── archive.php
|
||||||
├── single.php
|
├── single.php
|
||||||
├── archive-property.php
|
├── archive-property.php
|
||||||
├── single-property.php
|
├── single-property.php
|
||||||
|
├── archive-agent.php # Agent listing page
|
||||||
|
├── single-agent.php # Agent profile page
|
||||||
├── search.php
|
├── search.php
|
||||||
├── 404.php
|
├── 404.php
|
||||||
├── header.php
|
├── header.php
|
||||||
@@ -345,6 +357,8 @@ themes/homeproz/
|
|||||||
| `single.php` | `Single_Post` |
|
| `single.php` | `Single_Post` |
|
||||||
| `archive-property.php` | `Properties_Archive` |
|
| `archive-property.php` | `Properties_Archive` |
|
||||||
| `single-property.php` | `Single_Property` |
|
| `single-property.php` | `Single_Property` |
|
||||||
|
| `archive-agent.php` | `Agents_Archive` |
|
||||||
|
| `single-agent.php` | `Single_Agent` |
|
||||||
| `search.php` | `Search_Page` |
|
| `search.php` | `Search_Page` |
|
||||||
| `404.php` | `Error_404` |
|
| `404.php` | `Error_404` |
|
||||||
|
|
||||||
@@ -375,17 +389,92 @@ git commit -m "Phase X complete: [description]"
|
|||||||
2. ~~JS Library~~ → **jQuery** (confirmed)
|
2. ~~JS Library~~ → **jQuery** (confirmed)
|
||||||
3. ~~Preprocessor~~ → **SCSS** (confirmed)
|
3. ~~Preprocessor~~ → **SCSS** (confirmed)
|
||||||
4. ~~Build tool~~ → **Vite** (confirmed)
|
4. ~~Build tool~~ → **Vite** (confirmed)
|
||||||
5. Agents: ACF options page vs Agent CPT?
|
5. ~~Agents~~ → **Agent CPT** (implemented)
|
||||||
6. Testimonials: Static content vs Testimonial CPT?
|
6. Testimonials: Static content vs Testimonial CPT?
|
||||||
7. Maps: Embed codes vs Google Maps API?
|
7. Maps: Embed codes vs Google Maps API?
|
||||||
8. Form notifications: Which email address(es)?
|
8. Form notifications: Which email address(es)?
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Custom Post Types
|
||||||
|
|
||||||
|
### Property CPT (`property`)
|
||||||
|
|
||||||
|
**URL Structure:** `/properties/` (archive), `/properties/{slug}/` (single)
|
||||||
|
|
||||||
|
**ACF Fields:**
|
||||||
|
- **Basic Info:** `property_price`, `street_address`, `city`, `state`, `zip_code`, `mls_number`
|
||||||
|
- **Details:** `bedrooms`, `bathrooms`, `square_feet`, `lot_size`, `year_built`, `garage`
|
||||||
|
- **Content:** `short_description`, `property_features` (checkbox), `property_gallery` (gallery)
|
||||||
|
- **Documents:** `property_documents` (repeater with file + label)
|
||||||
|
- **External:** `external_listing_url` (URL to Zillow/MLS listing)
|
||||||
|
- **Agent:** `listing_agent` (post_object → Agent CPT)
|
||||||
|
|
||||||
|
**Taxonomies:**
|
||||||
|
- `property_status`: Active, Pending, Sold, Coming Soon
|
||||||
|
- `property_type`: Single Family, Townhouse, Condo, Land, Commercial, Multi-Family
|
||||||
|
|
||||||
|
### Agent CPT (`agent`)
|
||||||
|
|
||||||
|
**URL Structure:** `/agents/` (archive), `/agents/{slug}/` (single)
|
||||||
|
|
||||||
|
**ACF Fields:**
|
||||||
|
- **Contact:** `agent_phone`, `agent_email`, `agent_website`, `agent_title`, `agent_license`
|
||||||
|
- **Bio:** `agent_short_bio` (textarea, max 300 chars)
|
||||||
|
- **Gallery:** `agent_gallery` (gallery for additional photos; featured image is primary headshot)
|
||||||
|
- **Social:** `agent_social_links` (repeater: platform select + URL)
|
||||||
|
- **Settings:** `agent_order` (number, default 10), `agent_disabled` (toggle)
|
||||||
|
|
||||||
|
**Disabled Agent Behavior:**
|
||||||
|
- Does not appear on `/agents/` listing
|
||||||
|
- Profile page returns 404
|
||||||
|
- On property listings: shows name/photo but uses office phone, no profile link, "Contact Us" button instead of email
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Theme Options (ACF Options Page)
|
||||||
|
|
||||||
|
Located at **Appearance → Theme Options**
|
||||||
|
|
||||||
|
| Field | Key | Usage |
|
||||||
|
|-------|-----|-------|
|
||||||
|
| Phone | `theme_phone` | Office phone number (used via `homeproz_get_option('phone')`) |
|
||||||
|
| Email | `theme_email` | Office email |
|
||||||
|
| Address | `theme_address` | Office address |
|
||||||
|
| Facebook | `theme_facebook` | Facebook page URL |
|
||||||
|
| TikTok | `theme_tiktok` | TikTok profile URL |
|
||||||
|
|
||||||
|
Access in templates:
|
||||||
|
```php
|
||||||
|
$phone = homeproz_get_option('phone');
|
||||||
|
$email = homeproz_get_option('email');
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Contact Page Property Inquiry
|
||||||
|
|
||||||
|
The contact page supports pre-filling the message textarea with a property inquiry.
|
||||||
|
|
||||||
|
**URL Format:** `/contact/?property=Property+Name+Here`
|
||||||
|
|
||||||
|
**Behavior:**
|
||||||
|
- Extracts `property` GET parameter
|
||||||
|
- Pre-fills message with: "I would like to get more information on property: {Property Name}"
|
||||||
|
- Works with fallback form and Contact Form 7 (via JavaScript)
|
||||||
|
|
||||||
|
**Usage in templates:**
|
||||||
|
```php
|
||||||
|
$contact_url = add_query_arg('property', urlencode($property_title), home_url('/contact/'));
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
- Dark theme is unconventional for real estate but matches client brand
|
- Dark theme is unconventional for real estate but matches client brand
|
||||||
- Property images use 16:10 aspect ratio (better for real estate than 16:9)
|
- Property images use 16:10 aspect ratio (better for real estate than 16:9)
|
||||||
- No individual agent pages - all agents on single About page
|
- Agent listing page shows agents ordered by `agent_order` field, then alphabetically
|
||||||
- Sold properties remain visible (social proof)
|
- Sold properties remain visible (social proof)
|
||||||
- MLS numbers are display-only (no API integration)
|
- MLS numbers are display-only (no API integration)
|
||||||
|
- Properties imported from homeprozrealestate.com with external listing URLs to Zillow
|
||||||
|
|||||||
Reference in New Issue
Block a user