# Echo News 1.0.0

Echo News is a hybrid Gutenberg news and magazine theme converted from the packaged Echo HTML source. It preserves the source page compositions, rendered class hierarchy, CSS cascade, media, responsive rules, sliders, menus, search overlay, sidebar, dark mode, audio/video controls, and modal behavior while moving editorial content and record collections into WordPress-native management.

## Requirements and installation

- WordPress 6.4 or newer.
- PHP 7.4 or newer.
- No page builder, ACF package, commercial plugin, or generated dependency is required.

Upload `echo-files.zip` through **Appearance → Themes → Add New → Upload Theme**, then activate **Echo News**. The archive contains exactly one theme root: `echo-news/`.

## Demo import

Open the dashboard menu named **Import** and select **Import Echo News Demo**. The staged, nonce- and capability-protected importer creates:

- Ten numbered source homepage layouts plus the alternate Travel homepage.
- About, Team, and Contact pages assembled from independent Gutenberg section blocks.
- 295 native posts across the source categories, with the Standard and Post Styles 1–3 layouts.
- Eight `echo_team` records with role, portrait, biography, and social fields.
- Featured media where the supplied asset is a WordPress-supported image format.
- Primary, mobile, social, and three footer menus.
- Front-page assignment, Site Icon, theme settings, comments, and 66 private editorial collection definitions.

The importer uses stable private source keys and does not delete unrelated posts, pages, media, terms, or menus. Re-running it preserves edits to existing imported posts and pages. It deliberately rebuilds the six assigned menus named `Echo Primary`, `Echo Social`, and `Echo Footer 1–3` so the demo navigation remains duplicate-free and source-consistent.

## Gutenberg page architecture

The package contains 23 source template/page manifests and 115 independently reorderable section instances:

- 47 structured editorial sections.
- 66 query-backed post collections.
- Two Team-record grids.

Open **Pages → Edit** to manage the source sections visually. Each meaningful source section is a separate block. Visible text is editable in the preview; media, links, labels, query mode, category, alignment, color, and supported spacing controls are available in the block interface. The page is not stored as a Custom HTML block or page-sized shortcode.

The custom blocks are:

- **Echo Editorial Section** (`echo/source-section`).
- **Echo Post Collection** (`echo/post-collection`).
- **Echo Team Grid** (`echo/team-grid`).

Post collections read titles, links, excerpts, and featured images from native WordPress posts. Their query mode can use the source-curated editorial collection, latest posts, or a category slug. Empty strict queries hide the corresponding source card slots instead of leaking placeholder or unrelated demo records.

## Posts, categories, authors, and search

Articles use native WordPress titles, authors, dates, categories, featured images, Gutenberg content, comments, search, pagination, author archives, and related-post queries. The **Echo Article Layout** meta box selects Standard or source Post Styles 1–3. Category edit screens expose the three source category compositions. Search forms submit native `GET` requests with the `s` query variable, and search results use the source-faithful archive card system.

The private, UI-visible `echo_collection` taxonomy preserves source card groupings and display order for curated blocks. It is an editorial query mechanism, not a public archive.

## Team

Team entries are managed under **Import → Team**. Names, biographies, portraits, roles, and social URLs are record fields. Team grids query these records; the theme also provides Team singular and archive templates.

## Menus and footer

Manage navigation under **Appearance → Menus**. Registered locations are:

- Primary Menu.
- Mobile Menu.
- Social Links.
- Footer Columns 1–3.
- Legal Links.

The importer assigns the first six locations; Legal Links remains available for site-specific policy links. Footer copyright text and the contact-form recipient are under **Appearance → Customize → Echo News Global Content**. The recipient defaults safely to the WordPress administration email.

## Global styles and branding

`theme.json` exposes the source brand, accent, heading, body, surface, and border colors; body, display, and system font stacks; fluid type sizes; content widths; button styling; and the shared spacing scale. The immutable source stylesheets remain authoritative where their exact cascade is required.

The package includes a 1200×900 theme screenshot and generated 32, 64, 192, and 512-pixel Echo Site Icon assets plus `favicon.ico`. Import assigns the 512-pixel icon only when the site does not already have one.

## Forms

Contact and newsletter forms submit only to local WordPress handlers. They use nonces, same-origin endpoints, a honeypot, field length limits, sanitization, validation, accessible required states, safe redirects, a one-minute IP rate limit, and `wp_mail()`. Newsletter addresses are stored in the `echo_news_subscribers` option, deduplicated, sanitized, and capped at 5,000 entries.

## RTL and accessibility

For RTL locales, the supplied RTL CSS and JavaScript dependency tree is loaded. Section media use the complete supplied LTR media tree when an RTL-specific copy is unavailable. The theme adds a skip link, visible `:focus-visible` treatment, semantic landmarks, dialog semantics and focus management for overlays, keyboard dropdown behavior, accessible form labeling, reduced-motion handling, responsive media, native comments, and native search semantics.

## Source-preservation and WordPress execution deltas

The supplied LTR and RTL asset trees are retained byte-for-byte, excluding the original standalone HTML documents and obsolete source mailer endpoint. The WordPress conversion changes only execution boundaries needed for a real theme:

- Source navigation lists are replaced with editable WordPress menu output inside their original containers.
- Source search, contact, and newsletter forms are routed through native WordPress behavior and secure local handlers.
- Inline source year scripts are replaced by the globally managed copyright value.
- The malformed nested paragraph boundary in Post Style 2 is normalized to the browser-equivalent valid DOM; text, classes, order, and styling remain unchanged.
- Hardcoded article and Team cards become native record queries while retaining the source card elements, classes, nesting, and assets.
- Native single-post content, metadata, comments, archives, pagination, and SEO-compatible document titles replace static document routing.
- Nonvisual accessibility attributes, a skip link, and WordPress admin-bar offsets are added where required.

## Plugins, SEO, and configuration

No plugin and no ACF dependency is required. The lightweight JSON-LD fallback is suppressed when Yoast SEO or Rank Math is active. Source fonts referenced by the original stylesheet may fall back to the packaged/system stacks if remote font delivery is unavailable. Rewrite rules are flushed once on activation and at successful import finalization; routine requests do not flush them.

## Package verification

`MANIFEST.sha256` records every theme file and is verified by the companion `apply-and-verify-echo.sh` installer. The installer rejects unsafe paths, links/devices, duplicate or case-colliding names, nested archives, excessive archive bounds, a wrong root, missing required files, checksum mismatches, invalid JSON, and PHP/JavaScript syntax failures when the corresponding local runtimes are available.
