# HomeProz WordPress Theme Custom WordPress theme for HomeProz Real Estate (Albert Lea, MN). Dark/rust brand aesthetic with ACF-powered property listings. ## Development Rules 1. **No emojis** - nowhere in code, commits, docs, or conversation 2. **Tailwind CSS + SCSS** - compiled via Vite 3. **jQuery** - for all JS functionality 4. **Co-locate files** - SCSS/JS live alongside PHP templates 5. **Page-scoped styles** - wrap in `.Page_Class_Name { }`, early return in JS 6. **Server-side render** - no client-side templating 7. **No custom animations** - keep it static and fast 8. **ASK before architectural decisions** 9. **No git commits unless asked** - commits are for checkpoints before major work or major milestones, not for small single-file changes 10. **Sync to staging** - after modifying theme or plugin files, sync them to `/var/www/vhosts/homeprozrealestate.com/staging/` using rsync ## Version Control Policy Git is a snapshot tool and the historical record of what changed on the site. **If it's not in git, it may as well not exist.** When asked to commit, commit **everything except build artifacts** — do not pick a "scope" or hand-select files. The point is the snapshot. - **Commit:** all source (PHP, SCSS, JS), configs, `package.json`/`package-lock.json`, `db_content_updates/`, `node_modules/`, `dist/`, DB snapshots (`*.sql.gz`), plugins, themes, `CLAUDE.md`. `node_modules/` and `dist/` are tracked intentionally — see comments in `.gitignore`. - **Do not commit:** runtime caches (`wp-content/cache/transformed-images/`), log files (`wp-content/debug.log*`), and other transient/regenerable runtime output. These belong in `.gitignore`. If you find untracked files in scope of a commit, include them. If something looks ambiguous, default to committing it — under-tracking loses history; over-tracking is reversible. ## Build ```bash cd wp-content/themes/homeproz npm run build ``` ## Tools - **WP-CLI**: `wp --allow-root ` - **Dev commits**: `./dev_commit.sh "message"` (includes DB snapshot) ## WordPress Admin - **URL**: `/wp-admin/` - **Username**: `admin` - **Password**: `Byg2X2sqbHeVvHLYRz5e` ## Theme Options Access via `homeproz_get_option('key')`: - `phone`, `email`, `address`, `facebook`, `tiktok` ## Database Content Changes (MANDATORY) This site has a production fork. All database changes must be documented for production sync. **Schema changes** (new tables, columns, indexes): Use migration files in the MLS plugin (`wp-content/plugins/mls-by-hansonxyz/`). **Content changes** (options, ACF fields, posts, menus, terms): Create a timestamped document in `db_content_updates/` with: - Filename: `YYYY-MM-DD_HH-MM_description.md` - What was changed (exact field names, option keys, post IDs) - The exact values set (copy/paste the WP-CLI commands or SQL) - Why it was changed - Any dependencies or order of operations Example: `2026-01-04_19-30_add-footer-menu.md` **DO NOT** make database content changes without creating the corresponding document. The production team relies on these files to sync changes. ## Custom Post Types ### Agent (`/agents/`) - ACF: phone, email, bio, gallery, social links, order, disabled toggle - Disabled agents: 404 on profile, office contact on property cards ## Key Helpers ```php // Get locations with active/pending properties only $locations = homeproz_get_active_locations(); // Contact page with property inquiry prefill $url = add_query_arg('property', urlencode($title), home_url('/contact/')); ``` ## Page Classes `Home_Page`, `Properties_Archive`, `Single_Property`, `About_Page`, `Contact_Page`, `Blog_Archive`, `Single_Post`, `Agents_Archive`, `Single_Agent`, `Search_Page`, `Error_404` ## MLS Property Overrides ### Force a non-HomeProz listing to appear as HomeProz Some properties (e.g., LandProz listings) may need to appear on the HomeProz site. The `is_homeproz` flag overrides the office name check. 1. Find the property's `listing_key`: ```bash wp --allow-root db query "SELECT listing_key, listing_id, street_name, city, list_office_name, is_homeproz FROM wp_mls_properties WHERE listing_id LIKE '%%'" ``` 2. Set the override flag: ```bash wp --allow-root db query "UPDATE wp_mls_properties SET is_homeproz = 1 WHERE listing_key = ''" ``` 3. Document the change in `db_content_updates/` per the Database Content Changes policy. **Example**: 121 Main St, Glenville (NST7785198) is listed under "LandProz Real Estate, LLC" but appears on HomeProz via `is_homeproz = 1`.