From c2c2703568c9c57431e9ef6207a124b294e1fb72 Mon Sep 17 00:00:00 2001 From: "Hanson.xyz Dev" Date: Sun, 30 Nov 2025 19:11:57 -0600 Subject: [PATCH] Update CLAUDE.md with CPT, ACF, and feature documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- CLAUDE.md | 105 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 97 insertions(+), 8 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index e1abeadc..50daf9ad 100755 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -260,8 +260,8 @@ themes/homeproz/ │ └── tailwind.css # Tailwind imports ├── dist/ # Vite build output ├── inc/ -│ ├── acf-fields.php -│ ├── custom-post-types.php +│ ├── acf-fields.php # All ACF field definitions +│ ├── custom-post-types.php # Property & Agent CPTs │ ├── enqueue.php │ ├── theme-setup.php │ └── template-functions.php @@ -277,20 +277,32 @@ themes/homeproz/ │ │ ├── property-card.scss │ │ ├── property-filters.php │ │ ├── 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/ -│ ├── agent-card.php -│ ├── agent-card.scss +│ ├── hero-section.php +│ ├── hero-section.scss +│ ├── cta-section.php +│ ├── cta-section.scss │ └── ... ├── patterns/ ├── front-page.php ├── page.php ├── page-about.php -├── page-contact.php +├── page-contact.php # Supports ?property= prefill ├── archive.php ├── single.php ├── archive-property.php ├── single-property.php +├── archive-agent.php # Agent listing page +├── single-agent.php # Agent profile page ├── search.php ├── 404.php ├── header.php @@ -345,6 +357,8 @@ themes/homeproz/ | `single.php` | `Single_Post` | | `archive-property.php` | `Properties_Archive` | | `single-property.php` | `Single_Property` | +| `archive-agent.php` | `Agents_Archive` | +| `single-agent.php` | `Single_Agent` | | `search.php` | `Search_Page` | | `404.php` | `Error_404` | @@ -375,17 +389,92 @@ git commit -m "Phase X complete: [description]" 2. ~~JS Library~~ → **jQuery** (confirmed) 3. ~~Preprocessor~~ → **SCSS** (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? 7. Maps: Embed codes vs Google Maps API? 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 - 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) -- 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) - MLS numbers are display-only (no API integration) +- Properties imported from homeprozrealestate.com with external listing URLs to Zillow