MLS plugin fixes from this session: - Fix silent insert failures: location column NOT NULL was rejecting wpdb->insert calls, causing ~18k new properties since Dec 2025 to be lost. Inserts now build raw SQL with ST_PointFromText so the spatial column is populated atomically. - Auto-refresh expired media URLs in MLS_Media_Handler::fetch_and_cache(), guarded by a property-level GET_LOCK so concurrent fetches share one API refresh. - Normalize WP_Error to null in mls_get_property_image() so callers can rely on the documented string|null contract. - Support comma-separated property_type filters in MLS_Query and MLS_Cluster so the homepage "View All Commercial" link (?property_type=Commercial+Sale,Land,Farm) actually filters correctly. - Incremental sync now looks back 10 minutes past the latest modification timestamp as a safety margin against missed records. - Smart sync exits silently (info-level, not warning) when a full sync is in progress. Operational: - New cron: weekly full sync Sundays at 3 AM (/usr/local/bin/mls-full-sync). - New cron: hourly 2GB cap on mls-thumbnails/ and cache/transformed-images/ (/usr/local/bin/mls-image-cache-cap). - Logrotate config for wp-content/debug.log (2-day retention, daily rotation, delaycompress). Repo policy: - CLAUDE.md updated with explicit "commit everything except build artifacts" policy. - .gitignore: untrack runtime image caches and debug.log rotations. Other modifications in this snapshot are pre-existing in-flight theme/plugin/db_content_updates work. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4.7 KiB
Executable File
Split About and Team Pages + Blog Menu
Date: 2026-01-21 Type: Page Template Split + New Page Creation + Menu Updates Status: IMPLEMENTED IN DEV
Summary
The About page has been split into two separate pages:
- About Page - Company story, additional WYSIWYG content area, and CTA
- Team Page - Agent grid, broker info, and CTA
Additionally:
- Blog added to navigation menu
- Blog templates updated to use consistent archive-hero styling
Code Changes
- Created
page-team.php- New Team Page template - Modified
page-about.php- Removed team/broker sections, added WYSIWYG content section - Created
template-parts/content/content-team.scss- Team page styles - Updated
template-parts/content/content-about.scss- Added styles for additional content section - Updated
inc/template-functions.php- Added Team_Page body class - Updated
src/main.scss- Added team SCSS import - Updated
home.php- Blog index uses archive-hero for consistency - Updated
archive.php- Category/tag archives use archive-hero for consistency - Created
page-results.php- Results Page template for sold properties - Created
template-parts/content/content-results.scss- Results page styles
Database Changes (Already Applied in Dev)
The following changes were made directly to the dev database and need to be replicated in production:
1. Team Page Created
Page ID: 256 Title: Our Team Slug: team Template: page-team.php
-- Create page
INSERT INTO wp_posts (post_author, post_date, post_date_gmt, post_content, post_title, post_excerpt, post_status, comment_status, ping_status, post_name, post_type, post_modified, post_modified_gmt, to_ping, pinged, post_content_filtered)
VALUES (1, NOW(), UTC_TIMESTAMP(), '', 'Our Team', '', 'publish', 'closed', 'closed', 'team', 'page', NOW(), UTC_TIMESTAMP(), '', '', '');
-- Set page template (use the actual page ID from above)
INSERT INTO wp_postmeta (post_id, meta_key, meta_value) VALUES (LAST_INSERT_ID(), '_wp_page_template', 'page-team.php');
2. Menu Item Added to Primary Menu
Team added after About in the Primary Menu:
Menu Order:
- Properties (0)
- About (3)
- Team (4) - NEW
- Results (5) - NEW
- Resources (6)
- Blog (7) - NEW
- Contact (8)
-- Shift existing items down (adjust IDs for production)
-- Resources menu item: update menu_order from 4 to 5
-- Contact menu item: update menu_order from 5 to 6
-- Create nav_menu_item for Team (adjust page ID for production)
INSERT INTO wp_posts (post_author, post_date, post_date_gmt, post_content, post_title, post_excerpt, post_status, comment_status, ping_status, post_name, post_type, menu_order, post_modified, post_modified_gmt, to_ping, pinged, post_content_filtered)
VALUES (1, NOW(), UTC_TIMESTAMP(), '', 'Team', '', 'publish', 'closed', 'closed', 'team-menu', 'nav_menu_item', 4, NOW(), UTC_TIMESTAMP(), '', '', '');
-- Add to Primary Menu term relationship
-- Add required meta: _menu_item_type, _menu_item_object_id, _menu_item_object, etc.
3. Blog Menu Item Added
Blog page (ID 9, already exists) added to Primary Menu.
4. Results Page Created
Page ID: 259 Title: Our Results Slug: results Template: page-results.php
Displays sold/closed properties from MLS sync and manual entries, sorted by close date (most recent first).
Production Deployment Steps
- Deploy code changes (theme files)
- Run
npm run buildin theme directory - Either:
- Option A: Manually create Team page in WordPress admin, assign template, add to menu
- Option B: Run SQL statements above with adjusted IDs
Manual Steps (Option A - Recommended)
-
Go to Pages > Add New
-
Title:
Our Team -
Slug:
team -
Template: Team Page
-
Publish
-
Go to Appearance > Menus
-
Select Primary Menu
-
Add "Our Team" page (set custom label to "Team")
-
Add "Blog" page
-
Order: Properties, About, Team, Resources, Blog, Contact
-
Save Menu
Optional ACF Fields for Team Page
| Field | Default Value |
|---|---|
hero_title |
"Our Team" |
hero_subtitle |
"A dedicated group of real estate professionals committed to your success." |
hero_background |
(none) |
broker_title |
"Broker Information" |
broker_text |
HomeProz broker details |
cta_title |
"Ready to Work With Us?" |
cta_text |
"Contact our team today..." |
cta_button_text |
"Get in Touch" |
cta_button_url |
/contact/ |
Notes
- Agent ordering on Team page respects the
menu_orderfield (drag-drop sortable in admin) - Disabled agents are automatically excluded
- The About page retains its existing ACF fields