# Remove Legacy Property Posts **Date**: 2026-01-20 **Type**: Content Deletion **Priority**: Required before or after code deployment ## Summary The legacy manual property entry system has been deprecated. All properties now come exclusively from the MLS sync. This requires deleting the manually-created property posts and their associated data. ## What Changed The following legacy system components were removed from the codebase: - `property` custom post type registration - `single-property.php` template - `property-card.php` template part - ACF "Property Details" field group - Agent listings section from `single-agent.php` ## Database Changes Required on Production ### 1. Delete Legacy Property Posts Run this WP-CLI command to delete the legacy property posts: ```bash wp --allow-root post delete 24 35 60 85 125 --force ``` These were the legacy posts: - ID 24: "Geneva, MN - Double Lot with Shop" - ID 35: "115 N Newton Ave, Albert Lea, MN" - ID 60: "411 Court St, Albert Lea, MN" - ID 85: "1224 Saint Joseph Ave, Albert Lea, MN" - ID 125: "15131 800th Ave, Glenville, MN" ### 2. Clean Up Orphaned Post Meta After deleting the posts, clean up any orphaned meta data: ```bash wp --allow-root db query "DELETE pm FROM wp_postmeta pm LEFT JOIN wp_posts p ON pm.post_id = p.ID WHERE p.ID IS NULL" ``` ### 3. Flush Rewrite Rules After code deployment, flush rewrite rules to remove the property slug: ```bash wp --allow-root rewrite flush ``` ## Verification After completing these steps, verify: 1. The `/properties/` archive page still works (MLS-based) 2. Agent profile pages no longer show a "Current Listings" section (expected - removed) 3. No 404 errors from old property URLs (will naturally 404 since posts deleted) ## Notes - The `/properties/` URL now exclusively serves MLS data via `archive-property.php` - Individual property URLs use the `?listing=XXXXX` query parameter for MLS listings - Agent pages no longer display properties; this was intentional as the legacy linking system is deprecated