# TeachDemy Child Theme — Deployment Guide (v21)

## Fixes in v21 (this round)

### 1. Login page — the ACTUAL bug, finally
v16's changelog said "the brand side panel now properly appears via
JavaScript DOM manipulation" — that JS was written, but it searched
for `.td-auth-side` **inside** `#customer_login`
(`wrap.querySelector('.td-auth-side')`). `.td-auth-side` is injected
by the `woocommerce_before_customer_login_form` hook, which fires
**before** `<div class="wd-registration-page">` even opens — so it
was never inside `#customer_login`, and that querySelector always
returned `null`. The panel-move (and tab-move) never actually ran.
Fixed in `assets/js/auth-slider.js` by searching from `document`
instead of `wrap`. The two-column split design itself was already
well-built — it just needed this one query fixed to actually work.

### 2. Instructors page hero
`archive-instructor.php` was using `.hero`/`.hero-inner` — the
homepage's full-viewport-height, 2-column hero — with only one
column's worth of content. Result: a giant, mostly-empty hero.
Switched to `.page-hero` (the lighter, single-column hero every other
inner page uses). Also fixed `.stat b` text being dark-on-dark
inside the hero (that class is normally used on light backgrounds).

### 3. Blog / Articles page
Code logic for detecting the blog was already correct
(`is_home()`), but if `/blog/` is a manually-created Page rather
than WordPress's actual designated "Posts page" (Settings → Reading),
`is_home()` never fires and the page falls through every one of our
checks untouched. Added `blog`/`articles` to the slug fallback list
in both `teachdemy_use_redesigned_chrome()` and the blog-refresh
enqueue function, so it's covered either way.
**Please also verify:** Settings → Reading → "Posts page" — if it's
set to a page titled something other than "Blog", either rename/
reassign it, or tell us the actual slug so we can add it explicitly.

### 4. Dark mode — 2 more real gaps closed
Ran a full scan comparing every hardcoded text color against dark-
mode coverage (not just spot-checking). Found and fixed: the amber
"Pending" status badges on Withdrawal Requests and Support Tickets
had zero dark-mode override (#8A6414 on a #0d2222 card — barely
readable). If you still see unreadable text somewhere in dark mode
after this, screenshot it and tell us the exact page — the systematic
scan only catches colors written directly in our CSS files, not every
possible combination.

---

## Installation Steps

1. **Upload the theme**: Go to WordPress Admin -> Appearance -> Themes
   -> Add New -> Upload Theme -> choose `woodmart-child-v21.zip` ->
   Install Now -> Activate (replaces the whole theme folder).

2. **Assign page templates** (CRITICAL — pages won't look right
   without this):

   For each page below, edit the page in WordPress and set
   **Page Attributes -> Template**:

   | Page Slug | Template Name |
   |-----------|---------------|
   | `/courses/` | TeachDemy Courses |
   | `/contact/` | TeachDemy Contact |
   | `/faq/` or `/faqs/` | TeachDemy FAQ |
   | `/mentor-support/` | TeachDemy Mentor Support |
   | `/upcoming/` | TeachDemy Upcoming Courses |
   | `/affiliate/` | TeachDemy Affiliate |
   | `/become-instructor/` | TeachDemy Become Instructor |
   | `/privacy/` or `/privacy-policy/` | TeachDemy Privacy |
   | `/refund/` | TeachDemy Refund |
   | `/terms/` | TeachDemy Terms |
   | `/disciplines/` | TeachDemy Disciplines |

   These are also matched by slug automatically as a fallback (see
   `teachdemy_use_redesigned_chrome()` in functions.php), but the
   template assignment is what controls the actual page CONTENT/
   layout — the slug fallback only controls header/footer chrome.

3. **Set the front page**: Settings -> Reading -> Your homepage
   displays -> A static page -> select your home page. Then edit that
   page and set Template to "TeachDemy Home (New Design)".

4. **Verify the Posts page** (for the Blog fix above): Settings ->
   Reading -> check what "Posts page" is set to, and confirm its slug
   is `/blog/` (or tell us what it actually is).

5. **Clear every layer of cache** — this matters more than anything
   else in this list. In order: any caching plugin (WP Rocket,
   LiteSpeed Cache, W3TC…), WoodMart's own cache (Appearance ->
   WoodMart -> uncheck/recheck minification or use its "Clear cache"
   button if present), any host-level/CDN cache (Cloudflare etc.),
   then a hard-refresh (Ctrl/Cmd+Shift+R) in your browser. Several
   rounds of "fixed but not visible" in this project turned out to be
   a stale cache layer, not the code.

---

## Page Status

| Page | Status | Notes |
|------|--------|-------|
| Home | OK | Full-width hero, dark mode, all sections |
| Courses | OK | Assign template to /courses/ page |
| Disciplines | OK | Assign template to /disciplines/ page |
| Instructors | Fixed this round | Hero rebuilt — was using the wrong hero component |
| Single Instructor | OK | Auto-loads on /instructor/slug/ |
| Mentor Support | OK | 4-step wizard, assign template |
| Contact | OK | Assign template |
| FAQ | OK | Assign template |
| Terms / Privacy / Refund | OK | Assign templates |
| Affiliate / Become Instructor | OK | Assign templates |
| Upcoming | OK | Assign template |
| 404 | OK | Auto-loads |
| Blog/Articles | Fixed this round | Slug fallback added — please verify the Reading-settings Posts page (step 4 above) |
| My Account | Fixed this round | The actual DOM bug behind the login layout is fixed |
| Checkout | OK | checkout-refresh.css auto-loads (CSS only, no template override) |
| Shop/Product | OK | Redesigned header/footer + dark mode |
| Dark mode | Improved this round | 2 previously-uncovered "Pending" badge colors fixed |
