Files
homeproz/db_content_updates/2026-01-05_SEO_albert_lea_landing_page.md
T
root 57b752f54e Manual property enhancements: MLS status sync, agent clone, description formatting
- Manual properties linked to MLS now inherit status (Active/Pending/Closed) and
  days_on_market from the MLS listing dynamically
- Properties not in MLS default to Closed status
- Clone feature now auto-populates listing agent by matching MLS ID to Agent CPT
- Description formatter detects embedded headers (unpunctuated text after sentences)
  and splits them into separate paragraphs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 21:28:44 +00:00

3.4 KiB

Database Content Update: SEO - Albert Lea Landing Page

Date: 2026-01-05 Author: Claude (automated) Summary: Configure Albert Lea page as SEO landing page with city template

Overview

This update configures the existing Albert Lea page (ID 15) as an SEO-optimized city landing page that displays MLS listings for Albert Lea.

Changes Made

1. Update Albert Lea Page Slug

Change the URL from /albert-lea/ to /albert-lea-homes/ for better SEO targeting.

UPDATE wp_posts
SET post_name = 'albert-lea-homes'
WHERE ID = 15;

WP-CLI Alternative:

wp post update 15 --post_name=albert-lea-homes --allow-root

2. Set Page Template

Assign the City Landing Page template to the Albert Lea page.

-- First check if template meta exists
SELECT * FROM wp_postmeta WHERE post_id = 15 AND meta_key = '_wp_page_template';

-- If exists, update:
UPDATE wp_postmeta
SET meta_value = 'page-city-landing.php'
WHERE post_id = 15 AND meta_key = '_wp_page_template';

-- If not exists, insert:
INSERT INTO wp_postmeta (post_id, meta_key, meta_value)
VALUES (15, '_wp_page_template', 'page-city-landing.php');

WP-CLI Alternative:

wp post meta update 15 _wp_page_template page-city-landing.php --allow-root

3. Add Yoast SEO Meta

Add optimized meta title and description for the page.

INSERT INTO wp_postmeta (post_id, meta_key, meta_value) VALUES
(15, '_yoast_wpseo_title', 'Albert Lea Homes for Sale | HomeProz Real Estate'),
(15, '_yoast_wpseo_metadesc', 'Find homes for sale in Albert Lea, MN. Browse current listings, view property details, and connect with local real estate experts at HomeProz.');

WP-CLI Alternative:

wp post meta add 15 _yoast_wpseo_title "Albert Lea Homes for Sale | HomeProz Real Estate" --allow-root
wp post meta add 15 _yoast_wpseo_metadesc "Find homes for sale in Albert Lea, MN. Browse current listings, view property details, and connect with local real estate experts at HomeProz." --allow-root

4. Flush Rewrite Rules

Required after changing page slugs to update permalinks.

wp rewrite flush --allow-root

Dependencies

  • Theme files must be deployed first:
    • wp-content/themes/homeproz/page-city-landing.php
    • wp-content/themes/homeproz/page-city-landing.scss
    • wp-content/themes/homeproz/inc/yoast-seo.php
    • wp-content/themes/homeproz/inc/acf-fields.php (updated)
    • wp-content/themes/homeproz/functions.php (updated)
    • wp-content/themes/homeproz/dist/ (rebuilt assets)

Verification

After applying changes, verify:

  1. Page loads correctly:

    https://[domain]/albert-lea-homes/
    
  2. Template is active:

    wp post meta get 15 _wp_page_template --allow-root
    # Should output: page-city-landing.php
    
  3. Yoast meta is set:

    wp post meta get 15 _yoast_wpseo_title --allow-root
    wp post meta get 15 _yoast_wpseo_metadesc --allow-root
    
  4. MLS sitemap accessible:

    https://[domain]/mls-listings-sitemap.xml
    

Rollback

To revert these changes:

-- Restore original slug
UPDATE wp_posts SET post_name = 'albert-lea' WHERE ID = 15;

-- Remove template assignment
DELETE FROM wp_postmeta WHERE post_id = 15 AND meta_key = '_wp_page_template';

-- Remove Yoast meta
DELETE FROM wp_postmeta WHERE post_id = 15 AND meta_key IN ('_yoast_wpseo_title', '_yoast_wpseo_metadesc');

Then flush rewrite rules:

wp rewrite flush --allow-root