Investigative Journalism WordPress Custom Theme Legacy Migration Editorial Architecture

Criterio.hn

Rediseño y reconstrucción de una plataforma editorial WordPress

https://criterio.hn — Sistema Editorial Rediseñado
Ver Comparativa Antes vs Después ↓
Criterio.hn Rediseño Editorial Portada
Rediseño en Producción: Arquitectura periodística con Apertura Rectora, paleta editorial marfil/vino (#911E2E) y tipografía serif. Nuevo Sistema 2026

01 — Overview

  • Client / Project: Criterio.hn
  • Type: Editorial / Independent News / Investigative Journalism
  • Platform: WordPress (Custom Theme Engine)
  • Role: Yensel
  • Focus: Editorial architecture, legacy migration, responsive design, performance, accessibility, and maintainability.
  • Criterio.hn is one of Honduras' primary independent digital newsrooms, renowned for investigative reporting, environmental accountability, and rigorous fact-checking. Over years of intensive publishing, the outlet accumulated thousands of historical articles across evolving editorial formats.

    This case study documents the engineering, editorial restructuring, and technical recovery executed to transition Criterio.hn from an unmaintained, fragile web presence into a resilient, data-first WordPress editorial platform.


    02 — The Challenge

    The core challenge was never simply "reskinning a website" or delivering an aesthetic refresh. Criterio.hn operated on an extensive historical archive spanning more than a decade of reporting. Any technical intervention carried a high risk of breaking historical permalinks, corrupting visual presentation across older posts, or losing crucial editorial context.

    The project began with a core scope that quickly revealed deeper structural friction once audited against live data:

    The Original Problem

  • Visual & Structural Fatigue: An interface that failed to convey the institutional weight and investigative rigor of the newsroom.
  • Layout Inconsistencies: Disjointed typography, erratic spacing, and unresponsive grids across tablet and mobile viewports.
  • Maintenance Bottlenecks: A fragmented codebase relying on complex, unstandardized styling rules that made day-to-day newsroom management error-prone.
  • Preservation Imperative: A strict mandate to protect historical investigative reporting, original author attributions, and photography without manual re-entry.
  • Discovered Problems During Execution

  • Mutilated Migrations: An early prototype attempt using static frameworks (Astro SSR) had generated scraped, truncated article bodies and orphaned media assets, requiring an immediate architectural pivot back to a native WordPress theme structure.
  • Deeply Embedded Elementor Artifacts: Hundreds of historical longform stories and documentary galleries were locked inside legacy Elementor DOM wrappers (.e-con, .elementor-widget-image-gallery). Without the heavy Elementor stylesheet runtime loaded, global typography and layout styles broke catastrophically.
  • Third-Party Plugin Conflicts: Third-party editorial multi-author plugins injected hardcoded white container boxes (background-color: #ffffff !important) directly into specialized dark-mode layouts (such as documentary photo essays).
  • Database Taxonomy Divergence: Discrepancies between expected terminology and real production database slugs (e.g., historical database taxonomy typos and unregistered slug aliases) caused category queries to fail silently, pulling unrelated content or rendering empty sections.
  • Missing & Remote Media: Hundreds of featured images and embedded photos pointed to external URLs, legacy staging domains, or defunct CDNs susceptible to link rot.

  • 03 — Discovery & Audit

    To diagnose the health of the platform without endangering the live environment, an exhaustive multi-layered audit was conducted combining public REST API extraction, local database mirroring, and static code analysis.

    +---------------------+     +----------------------+     +---------------------+
    | Production REST API | --> | Taxonomy & Schema    | --> | Production Post     |
    | Discovery (Production) |     | Validation (Local)   |     | Fixture Extraction  |
    +---------------------+     +----------------------+     +---------------------+
                                                                        |
                                                                        v
    +---------------------+     +----------------------+     +---------------------+
    | Automated Static    | <-- | CSS Breakout &       | <-- | Multi-Viewport QA   |
    | Verification Suite  |     | Overflow Auditing    |     | (320px to 1440px)   |
    +---------------------+     +----------------------+     +---------------------+

    Audit Methodology & Key Findings

    1. REST API & Taxonomy Mapping:

    Inspection of production endpoints revealed that Criterio's category tree did not mirror conventional blog setups. It contained deeply nested categories, historic investigative beats, and distinct editorial initiatives with hundreds of associated entries that required programmatic aliasing rather than naive theme hardcoding.

    2. Content Payload Inspection:

    Analysis of raw post_content rows exposed extensive legacy contamination: inline inline-block scripts, obsolete social sharing wrappers (Jetpack, AddToAny), empty paragraph tags (

     

    ), and unclosed tags originating from scraped migrations.

    3. Responsive Geometry Audits:

    DOM inspections across standard viewports (320px, 390px, 768px, 1280px, and 1440px) proved that global wide-alignment breakout rules (calc(50% - min(100vw - 2rem, 1140px) / 2)) were causing severe horizontal overflow on mobile screens whenever images were nested inside table cells, blockquotes, or legacy wrappers.

    4. Fixture-Based QA:

    Rather than testing against sanitized Lorem Ipsum mockups, real production articles—specifically longform investigative pieces and multi-photo essays—were extracted as localized HTML fixtures to stress-test rendering under real-world conditions.


    04 — From Generic Website to Editorial System

    A commercial website displays products; a digital newsroom curates the national agenda. The project's central strategic evolution was transitioning from a generic blog layout into an intentional, hierarchical Editorial System.

    The platform was re-engineered around distinct reading experiences tailored to specific journalistic genres:

    Editorial Model Journalistic Purpose Visual & Technical Differentiation
    Noticia (Daily News) Rapid breaking news and daily coverage. High information density, clear dateline, prominent kicker, optimized reading measure (~65ch), standardized timestamp.
    Investigación (Dossier) Deep fiscalization and systemic corruption reporting. Formal Dossier aesthetic: noble paper canvas, institutional wine header border (#911e2e), prominent investigative deck, structured evidence links.
    Reportaje (Longform) In-depth narrative and human rights journalism. Elegant serif drop-caps, immersive pull-quotes, wide editorial figure breakouts, chapter dividing markers.
    Verificación / El Mirón Institutional fact-checking and disinformation debunking. Dedicated verdict architecture: distinct badge classification (Verdadero, Falso, Engañoso, Ridículo), claim metadata, target quote box, and methodology breakdown.
    Opinión (Columns) Editorial commentary and public debate. Dedicated columnist byline, circular author avatar, byline-first visual hierarchy, clear separation from factual reporting.
    Especiales (Multimedia) Transmedia investigations and grant-funded series. Standalone landing architecture (page-especiales.php), partner alliance credit blocks, multi-chapter navigation, independent sub-themes.
    Disparo Crítico Documentary photojournalism and visual chronicles. Immersive dark stage canvas (#12100e), edge-to-edge documentary photography pacing, scoped high-contrast card overrides, subdued UI chrome.

    Transformación Visual Forense: Antes vs Después

    Comparativa de la portada completa: de maqueta oscura genérica a sistema editorial periodístico estructurado.

    Criterio.hn Antes - Maqueta previa oscura
    ↓ Desplaza para inspeccionar página completa
    Deficiencias Detectadas en la Versión Previa:
    • Sobrecarga cromática oscura: Fondo negro sin contraste adecuado para lectura prolongada de noticias diarias.
    • Falta de jerarquía periodística: Bloques de noticias uniformes sin Apertura Rectora ni jerarquización editorial clara.
    • Espacios desaprovechados: Módulos flotantes sin anclaje a secciones reconocibles de un periódico de investigación.
    Criterio.hn Después - Rediseño editorial implementado
    ↓ Desplaza para inspeccionar página completa
    Logros Técnicos y Editoriales del Rediseño:
    • Auténtica identidad de prensa: Lienzo marfil cálido (#F7F1E8) con acento vino institucional (#911E2E) y tipografía serif.
    • Apertura Rectora (Hero Lead): Encabezado editorial jerarquizado, deck curado y encuadre 16:10 para impacto visual periodístico.
    • Módulos editoriales canónicos: Lo Esencial, Dossier de Investigaciones, Verificaciones de El Mirón, Opinión y Especiales Multimedia.

    05 — Editorial Architecture

    Editorial credibility depends on data integrity. If a CMS cannot reliably connect a category slug to a template layout, the entire editorial hierarchy breaks.

    +------------------------------------------------------------------------+
    |                      CRITERIO EDITORIAL ENGINE                         |
    +------------------------------------------------------------------------+
                                        |
              +-------------------------+-------------------------+
              |                                                   |
              v                                                   v
    +-------------------------+                         +--------------------+
    | Dynamic Curation Slots  |                         | Category Aliases   |
    | (Post Meta / Sticky ID) |                         | Resolver Engine    |
    +-------------------------+                         +--------------------+
              |                                                   |
              +-------------------------+-------------------------+
                                        |
                                        v
              +---------------------------------------------------+
              |          Strict Section Claim Guard               |
              |  (Aborts query if term is missing or unassigned)  |
              +---------------------------------------------------+
                                        |
                                        v
              +---------------------------------------------------+
              |     Deterministic Chronological Fallback Loop     |
              +---------------------------------------------------+

    Categories, Tags, and Alias Resolution

    To decouple display logic from messy database history, an abstraction layer was built in functions.php:

  • Category Aliasing (criterio_category_aliases): Centralized dictionary that maps logical editorial beats (environment, politics, corruption) to arrays of real database slugs, ensuring resilience against legacy name variations.
  • Strict Deduplication Engine: A memory-safe ID exclusion tracking mechanism prevents lead stories featured in the Hero or "Lo Esencial" from appearing redundantly in lower categorical sections.
  • Defensive Taxonomy Normalization & Alias Resolution

    A critical discovery during the taxonomy audit was the presence of historical database category slugs that deviated from grammatical standards due to legacy editorial typos. Without defensive mapping, standard WordPress theme queries failed silently, leaving key news sections blank.

  • The Failure Mode: The query failed to resolve the category ID. Under traditional WordPress themes, this would trigger an unrestricted query fallback, silently pulling generic posts from completely unrelated beats into the Environmental section.
  • The Engineering Fix:
  • 1. Engineered criterio_category_aliases() with defensive mapping arrays to automatically resolve historical slug deviations.

    2. Registered fallback color tokens for legacy aliases within criterio_category_color() to guarantee visual consistency.

    3. Implemented a strict Section Claim Guard in index.php: if $category_ids resolves to empty or contains 0 published posts, the section query aborts immediately (return criterio_query_posts_by_ids(array())). It renders nothing rather than corrupting the page with uncurated content.

  • Why This Matters: Frontend design cannot be insulated from database realities. An editorial UI that silently displays the wrong journalism damages institutional trust.

  • 06 — Homepage

    The homepage is the front window of the newsroom. In digital journalism, the front page must balance immediate breaking news with high-impact investigative packages.

    +------------------------------------------------------------------------+
    | TOP BAR: Institutional Date, Edition Indicator, Live Ticker            |
    +------------------------------------------------------------------------+
    | HEADER: Masthead, Navigation Drawer, Search, Direct Support CTA       |
    +------------------------------------------------------------------------+
    | APERTURA RECTORA (HERO LEAD)            | LO ESENCIAL (SUMARIO)        |
    | - Playfair Display (2.2rem - 3.6rem)    | - 01 Lead Quick Brief        |
    | - Editorial Deck (.criterio-lead__deck) | - 02 Secondary Lead Brief    |
    | - 16:10 Focal-Trained Photograph       | - 03 Context Read            |
    +-----------------------------------------+------------------------------+
    | INVESTIGACIONES: Dossier Periodístico (Noble Paper Canvas + Wine Trim) |
    +------------------------------------------------------------------------+
    | CATEGORICAL SECTIONS: Lead Horizontal + Compact Sub-Grid (4 Stories)   |
    | (Política, Derechos Humanos, Corrupción, Ambiente, Opinión, etc.)       |
    +------------------------------------------------------------------------+
    | FOOTER: Institutional Transparency, Impressum, Legal, Archival Search  |
    +------------------------------------------------------------------------+

    Key Architecture Components

  • Apertura Rectora (Hero Lead): Built to dominate visual hierarchy. Features an editorial display headline in Playfair Display (scaling fluidly from 2.2rem to 3.6rem), a curated editorial deck (.criterio-lead__excerpt), and photography constrained to a 16:10 aspect ratio with focal centering (object-position: center 25%).
  • Lo Esencial (Executive Summary): Structured as a three-story editorial briefing. Uses numbered editorial counters (01, 02, 03) rendered in institutional wine (#911e2e) separated by vertical rules reminiscent of print newspaper columns.
  • Automated Excerpt Sanitization: A regex pipeline in inc/editorial-home.php strips metadata pollution from article summaries—removing camera credits (Foto portada:...), legacy datelines (Tegucigalpa, Honduras. –), and author tags, presenting readers with clean narrative prose.
  • Temporal Contextual Badges: To prevent historical investigations (e.g., stories published in 2022) from being misinterpreted as breaking news, an automated helper inspects publication dates and appends an Archivo indicator on any story older than 365 days.
  • Section Rhythm & Editorial Density: Secondary categories utilize a "Lead + Grid" pattern (one horizontal focal story supported by a compact 4-card sub-grid), eliminating empty sidebar gaps while maintaining uniform card heights across viewports.
  • NOTE

    Deliberate Homepage Length: The homepage is expansive by design. Unlike SaaS landing pages built for single-funnel conversions, a national publication front page must index multiple beats (Politics, Human Rights, Climate, Migration, Culture) simultaneously to represent the full breadth of editorial coverage.


    07 — Article Experience

    The longform article template (single.php) was engineered to provide an uninterrupted, high-legibility reading environment that respects editorial context and author attribution.

    Typography & Reading Geometry

  • Centralized Prose Engine: Reading typography is strictly governed under .criterio-article-prose. Line measure is capped at 68 characters (~700px), with font sizes fluidly scaled via clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem) and line heights set to 1.65 to reduce reading fatigue.
  • Font Pairing: Editorial authority is established using Playfair Display for primary headlines and section titles, paired with Source Sans 3 for body copy, navigational chrome, and metadata badges.
  • Component Breakdown

  • Editorial Eyebrow & Dateline: Semantic category pill linked to archive, accompanied by publication date, last updated timestamp, and estimated reading time.
  • Byline Architecture: Integrated with a customized multi-author attribution engine supporting collaborative investigative teams with localized avatars, biographical blurbs, and social links.
  • Editorial Figures & Captions: Images wrapped in semantic
    tags featuring full-bleed breakout options, subtle bottom borders, and standardized italic photo credits (
    ).
  • Reader Engagement & Support: Non-intrusive in-article share bar (WhatsApp, X/Twitter, Facebook, native clipboard copy) paired with an institutional support callout inviting readers to back independent journalism.

  • 08 — Disparo Crítico

    Disparo Crítico is Criterio.hn's flagship documentary photojournalism vertical, curated primarily by photojournalist Horacio Lorca. It presents longform photographic essays documenting human rights, ecological devastation, and rural realities.

    +------------------------------------------------------------------------+
    | LIGHT GLOBAL HEADER (Masthead, Navigation)                            |
    +------------------------------------------------------------------------+
    | GRADIENT TRANSITION ZONE (Soft visual fade into dark canvas)           |
    +------------------------------------------------------------------------+
    | DARK STAGE CANVAS (#12100e)                                            |
    |                                                                        |
    |  [ Figure 01: Full Documentary Photo ]                                |
    |  Caption: Italic context, source attribution                           |
    |                                                                        |
    |  [ Documentary Narrative Prose (~350 words) ]                          |
    |                                                                        |
    |  [ Figure 02: Full Documentary Photo ]                                |
    |  [ Figure 03: Full Documentary Photo ]                                |
    |                                                                        |
    |  +------------------------------------------------------------------+  |
    |  | AUTHOR ATTRIBUTION CARD (Scoped Dark Theme Override)             |  |
    |  | Surface: --disparo-card (#1c1917) | Text: #f7f5f0                |  |
    |  | Avatar: Circular Border | WCAG 2.2 AA Contrast: 7.2:1             |  |
    |  +------------------------------------------------------------------+  |
    +------------------------------------------------------------------------+

    Representative Case Study: Longform Photojournalism Chronicle

  • Genre: Flagship documentary photo essay chronicling vulnerable ecological and coastal reserves.
  • Characteristics: ~30 high-resolution documentary photographs, ~348 words of contextual narrative, authored by Horacio Lorca.
  • Markup Context: Originally authored within legacy Elementor section containers (.e-con-boxed, .elementor-widget-image-gallery) and native WordPress single-column galleries (.gallery-columns-1).
  • Identified Failures

    1. Lateral Breakout Shift: Global CSS rules attempted to force all

    elements into full-bleed breakouts. Because Elementor nested figures within arbitrary div hierarchies, the calculation calc(50% - min(100vw - 2rem, 1140px) / 2) offset images sideways, pushing 40% of each photograph outside the viewport and generating massive horizontal scroll on mobile.

    2. Erratic Vertical Spacing: Missing Elementor utility classes caused margins between consecutive documentary photographs to collapse entirely or expand uncontrollably.

    3. The "White Card" Injection: The third-party multi-author plugin injected an author profile card at the end of the post with inline #ffffff background styling. On the dark #12100e stage of Disparo Crítico, this rendered as a jarring white banner that broke the documentary atmosphere.

    The Technical Solution

    All adjustments were isolated strictly within the .article--disparo namespace:

  • Direct-Child Breakout Guard: Restricted the breakout calculation exclusively to direct children of the prose container:
  • `css

    .article--disparo .criterio-article-prose > figure {

    / Full width breakout applies only to unnested root figures /

    margin-left: calc(50% - min(100vw - 2rem, var(--container-max)) / 2);

    margin-right: calc(50% - min(100vw - 2rem, var(--container-max)) / 2);

    max-width: 100vw;

    }

    `

  • Elementor & Gallery Container Normalization: Stripped floats, normalized block margins, and enforced consistent 1.5rem spacing between consecutive images inside legacy Elementor divs and native gallery blocks.
  • Author Card Dark-Mode Scoping: Implemented high-specificity overrides targeting third-party author card containers, forcing background to --disparo-card (#1c1917), text to #f7f5f0, and styling avatars with subtle circular borders.
  • Header Transition Gradient: Introduced a linear gradient overlay at the top of .article--disparo .criterio-article-header to create a smooth, cinematic transition between the site's light global header and the dark photojournalism canvas.
  • Architectural Boundary: Phase 2 Separation

    A deliberate decision was made not to impose an artificial multi-column magazine grid. Horacio Lorca's visual essay was conceived as a sequential documentary stream; forcing it into an editorial masonry grid would have disrupted the narrative pacing. Advanced interactive photo-essay layouts, full-screen lightbox sequences, and custom photo grids were formalized as Phase 2 Architecture, leaving the authentic narrative sequence intact.


    09 — Legacy Content Recovery

    A critical phase of the project involved recovering content damaged or truncated during historical migrations. A dedicated WP-CLI migration routine and secure administrative recovery tools were engineered to restore damaged articles directly from the canonical editorial API source.

    +-----------------------------------------------------------------------+
    |                 CONTENT RECOVERY PIPELINE (WP-CLI)                    |
    +-----------------------------------------------------------------------+
                                        |
              +-------------------------+-------------------------+
              |                                                   |
              v                                                   v
    +-----------------------------+             +-------------------------------+
    | Truncated Articles (11 IDs) |             | Longform Specials (3 Targets) |
    | Allowed Whitelist           |             | Remote Page ID Mapping        |
    +-----------------------------+             +-------------------------------+
              |                                                   |
              +-------------------------+-------------------------+
                                        |
                                        v
              +---------------------------------------------------+
              | Fetch Full Payload from Canonical REST API Source |
              +---------------------------------------------------+
                                        |
              +---------------------------------------------------+
              | Sanitization Pipeline:                            |
              | - Strip legacy scripts & styles                   |
              | - Remove Jetpack / AddToAny / sharing markup      |
              | - Clean empty paragraphs & excessive breaks       |
              +---------------------------------------------------+
                                        |
              +---------------------------------------------------+
              | Inline Media Localization & Local Sideloading     |
              | (SHA-256 deduplication into WP Media Library)     |
              +---------------------------------------------------+
                                        |
              +---------------------------------------------------+
              | Safe Database Update (wp_update_post)             |
              +---------------------------------------------------+

    1. Recovery of Truncated Migrated Posts

    During early import operations, 11 critical investigative articles were truncated mid-sentence due to unhandled character encodings or timeout limits.

  • Target Selection: A strict whitelist of 11 verified truncated articles was audited, preventing unintentional bulk overrides.
  • Execution: A specialized CLI command was executed under authenticated developer oversight. The tool fetched the full HTML payload from the production REST API, applied strict sanitization, and restored complete article bodies without modifying published dates or authors.
  • 2. Longform Investigative Specials Recovery

    Complex, multi-part investigative series published as standalone pages had suffered severe structural loss. A dedicated structural mapping was engineered to re-anchor multipart investigations into cohesive dossier pages:

  • Investigation Series I: Environmental and hydrocarbon investigations in indigenous territories restored from multipart remote payloads into a unified reading layout.
  • Investigation Series II: Multi-chapter investigative reports examining coastal erosion, forced climate migration, and institutional displacement.
  • 3. Inline Media Sideloading & Deduplication

    To eliminate dependency on remote servers vulnerable to deprecation, an automated media localization engine scanned recovered HTML, downloaded external images, imported them into the native WordPress Media Library using media_handle_sideload(), and rewrote image src attributes to local attachment URLs with SHA-256 hash deduplication.


    10 — El Mirón / Investigaciones / Especiales

    The platform establishes distinct, structured architectures for specialized investigative units:

    El Mirón (Fact-Checking & Verification)

    El Mirón is Criterio.hn's dedicated fact-checking vertical. Rather than treating verifications as generic blog posts, the system implements a structured verdict model (category-el-miron.php):

  • Historic Verdict Taxonomies: Programmatically maps and styles historical verdict categories: elmiron-verdadero (True), elmiron-falso (False), elmiron-enganoso (Misleading), and elmiron-ridiculo (Ridiculous).
  • Verdict Chrome: Injects high-contrast verdict ribbons, target quote callouts displaying who made the claim, the date of the claim, and a summary of the factual contradiction.
  • Integrity Principle: Reader submission forms and unverified fact-checking claim widgets were rejected; the interface represents an authentic, one-way editorial publication unit.
  • Investigaciones (Investigative Dossiers)

    Investigative journalism represents the core of Criterio's brand equity.

  • Visual Identity: Restored the noble paper aesthetic (var(--paper)), framed by a top 3px institutional wine border (#911e2e).
  • Editorial Anatomy: Eyebrow kicker (DOSSIER · PERIODISMO DE INVESTIGACIÓN), bold serif lead, prominent deck, and structured sidebars linking to accompanying documentary evidence, official filings, and methodology notes.
  • Especiales (Special Series)

  • Dedicated custom templates (page-especiales.php, page-special.php) designed to group multi-chapter investigative projects.
  • Standardized alliance metadata displaying international media consortiums and donor acknowledgments without corrupting core taxonomy trees.

  • 11 — Technical Foundation

    The theme was built from the ground up as a bespoke WordPress engineering asset, completely free of bulky visual builders, commercial starter themes, or external design dependencies.

    +------------------------------------------------------------------------+
    |                      BESPOKE TECHNICAL STACK                           |
    +------------------------------------------------------------------------+
    | ENGINE:       Pure WordPress Custom Theme (PHP 8.2 Compatible)         |
    | STYLING:      Native CSS Custom Properties (Design Tokens), Flex/Grid  |
    | LOGIC:        Vanilla JavaScript (ES6+), Zero jQuery in Frontend       |
    | TYPOGRAPHY:   Self-Hosted WOFF2 (Playfair Display & Source Sans 3)     |
    | ACCESSIBILITY:WCAG 2.2 AA Calibrated (#e8536a Dark Accent, 5.3:1 Ratio)|
    | STRUCTURED:   Schema.org JSON-LD (NewsArticle, FactCheck, Breadcrumbs) |
    | SECURITY:     Strict Nonce Gating, Admin Capability Checks             |
    +------------------------------------------------------------------------+

    Core Architecture

  • Stack: Clean, modular PHP structured according to native WordPress template hierarchy (index.php, single.php, archive.php, category-el-miron.php, 404.php, search.php).
  • Styling Strategy: Pure CSS Custom Properties organized into semantic tokens (--color-brand-, --color-text-, --color-surface-, --font-, --space-*). Zero runtime overhead from utility libraries in production.
  • Self-Hosted Typography: Eliminated external calls to Google Fonts to ensure European GDPR/privacy compliance and eliminate third-party render-blocking requests. Fonts (Playfair Display and Source Sans 3) are served locally via WOFF2 formats with font-display: swap.
  • Zero Frontend jQuery: All interactive frontend components (mobile navigation drawer, reading progress indicator, search modal, copy-to-clipboard) are written in modular Vanilla JavaScript (ES6+).
  • Accessibility (A11y) & SEO

  • WCAG 2.2 AA Compliance: High-contrast color calibration across all themes. In dark mode, primary accents were calibrated to #e8536a, achieving a 5.3:1 contrast ratio against deep dark surfaces (exceeding the 4.5:1 AA standard).
  • Keyboard Navigation: High-contrast :focus-visible indicators across all interactive elements, skip-to-content links, and fully accessible ARIA modal dialog patterns for navigation drawers.
  • Structured Data: Automated injection of JSON-LD schemas for NewsArticle, FactCheck, Organization, and BreadcrumbList, respecting Yoast/Rank Math plugins when active without emitting duplicate nodes.
  • Defensive Security Boundaries

  • Maintenance Isolation: All content recovery and media localization tools are completely isolated from public web execution, guarded by strict command-line context requirements and disabled by default in production configurations.
  • Strict Capability Checks: Every administrative endpoint and AJAX handler enforces current_user_can('manage_options') and validates WordPress nonces (check_admin_referer()).

  • 12 — Testing & Validation

    Quality assurance followed a strict, repeatable engineering cycle:

    $$\text{Inspect} \longrightarrow \text{Implement} \longrightarrow \text{Lint} \longrightarrow \text{Regression Suite} \longrightarrow \text{Responsive QA} \longrightarrow \text{Review} \longrightarrow \text{Commit}$$

    To ensure complete honesty regarding production readiness, testing was categorized into four distinct validation tiers:

    +------------------------------------------------------------------------+
    |                       VALIDATION HIERARCHY                             |
    +------------------------------------------------------------------------+
    | 1. STATIC VERIFICATION:                                                |
    |    - php -l scan on all PHP files (PHP 8.2.29)                         |
    |    - node --check on all JavaScript source files                       |
    |    - Regex secret and credential scanner (0 leaks found)               |
    +------------------------------------------------------------------------+
    | 2. FIXTURE QA:                                                         |
    |    - Real-world legacy production markup fixtures              |
    |    - HTML rendering across 320px, 390px, 768px, 1280px, 1440px         |
    |    - Visual validation of zero horizontal overflow                     |
    +------------------------------------------------------------------------+
    | 3. INTEGRATED WORDPRESS QA:                                            |
    |    - Local WP runtime execution with MySQL and active plugins          |
    |    - Template hierarchy and query parameter validation                 |
    +------------------------------------------------------------------------+
    | 4. PRODUCTION QA:                                                      |
    |    - Public DOM inspection against the live production server environment                 |
    |    - Verification of server cache invalidation and release deployment  |
    +------------------------------------------------------------------------+
    IMPORTANT

    Validation Boundary: Passing Fixture QA and Integrated Local QA confirms code stability and geometric resilience, but does NOT constitute completed production deployment. Production verification requires independent, authenticated live testing once theme packages are installed on the public server.


    13 — Git & Reproducibility

    A disciplined Git workflow was maintained throughout the project, ensuring that every architectural shift, fix, and release candidate remained traceable and fully reproducible.

    Engineering Milestones & Iterative Delivery

    Milestone / Release Engineering Scope Verified Architectural Impact
    Phase 1: Architecture Pivot Custom WordPress Theme Core Architecture Transitioned platform from experimental static SSR prototype into native, high-performance WordPress theme hierarchy.
    Phase 2: Data Recovery CLI Historical Content Recovery Suite Restored 11 confirmed truncated articles directly from canonical API sources without modifying historic permalinks or timestamps.
    Phase 3: Investigative Specials Multipart Longform Series Migration Re-anchored multi-chapter investigative dossiers with complete local media localization and SHA-256 deduplication.
    Phase 4: Reading Geometry Prose Engine & Fluid Typography Implemented centralized .criterio-article-prose standards, optimal reading measure (68ch), and fluid clamp() scaling.
    Phase 5: Layout Standardization Single Article Composition & Byline Scoping Standardized single article headers, category eyebrow pills, reading time metrics, and multi-author team attributions.
    Phase 6: Defensive Normalization Legacy Page Builder Cleanup & Image Guards Defensive CSS normalization eliminating mobile horizontal scroll and lateral breakout shifts caused by legacy containers.
    Phase 7: Production Certification Taxonomy Alignment & Responsive Certification Resolved legacy database taxonomy aliases, calibrated WCAG 2.2 AA contrast ratios, and certified zero overflow from 320px to 1440px.

    Release Packaging Automation

    A custom build pipeline (scripts/build-release.sh) was established to generate deterministic, production-ready theme ZIP archives:

  • Strict Allowlist: Excludes development configurations, tests, documentation, markdown audits, uncompiled CSS, and OS artifacts (.DS_Store).
  • Integrity Manifests: Each release generates a companion .sha256 checksum and .manifest.sha256 file documenting the exact byte size and SHA-256 hash of every bundled file, guaranteeing verifiable deployments from v1.0.6 through v1.0.13.

  • 14 — AI / Future Editorial Experience

    During the later phases of the project, a future-facing architectural roadmap was designed to evaluate how generative AI and automated audio could serve an independent newsroom without compromising journalistic rigor.

    $$\text{Published Article} \longrightarrow \text{Supervised Summary} \longrightarrow \text{Automated TTS Audio} \longrightarrow \text{Grounded Editorial Q\&A} \longrightarrow \text{Syndication}$$

    To maintain strict professional honesty, the components of this roadmap are classified below:

  • IMPLEMENTED (In Theme Engine):
  • Data foundation for audio playback metadata (template-parts/audio-player.php and inc/audio.php).
  • Strict editorial authorization guard: audio player renders only when an audio file is uploaded, marked with status = approved, validated against an authorized source, and confirmed by an editorial reviewer.
  • ARCHITECTED (Specification Ready):
  • Webhook architecture connecting post publishing hooks to external Text-to-Speech (TTS) transcoders for automated article narration.
  • Editorial summary pipeline designed to extract structured bullets for mobile widgets.
  • PLANNED (Future R&D):
  • Retrieval-Augmented Generation (RAG) system for article-grounded Q&A, strictly bounded to Criterio's reporting archive to prevent hallucinations.
  • Contracted third-party AI voice synthesizer agreements.
  • Automated multilingual translation pipelines.

  • 15 — What I Learned

    1. WordPress Editorial Systems Require Data-First Thinking: You cannot design an editorial theme using clean placeholder mockups. An editorial layout must be engineered defensively around the messiest, longest, most complex real-world data in the database.

    2. Legacy Builders Contaminate Long-Term Maintainability: Visual page builders like Elementor leave persistent structural scar tissue inside database content. Eliminating the builder requires writing defensive CSS that normalizes legacy markup without breaking standard content.

    3. Taxonomy Correctness Dictates User Experience: Frontend design and backend data are inseparable. A single typographical mismatch in a database slug can break entire sections of a homepage.

    4. Responsive QA Must Test Real Editorial Assets: A 320px viewport test using two short paragraphs will never catch a nested image gallery breakout bug. Responsive validation is only meaningful when conducted with real production assets.

    5. Linters Cannot Replace Visual Inspection: Automated tests and syntax checks are essential for stability, but only careful multi-viewport visual audits will expose contrast clashes, font clipping, and awkward typographic orphans.

    6. Release Confidence Depends on Environment Boundaries: Clear boundaries between Local Development, Staging, and Production prevent untested code from leaking into live environments and ensure rollback safety.


    16 — Current Status

    To maintain transparent documentation, the status of the project artifacts is explicitly defined:

    +------------------------------------------------------------------------+
    |                          CURRENT STATUS MATRIX                         |
    +------------------------------------------------------------------------+
    | [COMPLETED]                                                            |
    | - Custom WordPress theme architecture and modular template hierarchy   |
    | - Taxonomy aliasing engine and defensive category claim guards         |
    | - Scoped normalization for legacy Elementor markup and galleries        |
    | - Documentary Photojournalism responsive overflow & author fixes   |
    | - Truncated article recovery suite and inline image localizer          |
    | - WCAG 2.2 AA color contrast calibration and focus indicators          |
    | - Allowlist build pipeline with automated SHA-256 manifest generation  |
    +------------------------------------------------------------------------+
    | [VALIDATED LOCALLY]                                                    |
    | - Theme Release Package v1.0.13 packaged and checksum-verified         |
    | - Clean Git working tree at production release tags                    |
    | - Static regression suite and copy sanitization tests passing (100%)   |
    | - Multi-viewport HTML fixtures (320px to 1440px) verified              |
    +------------------------------------------------------------------------+
    | [PENDING INTEGRATED QA]                                                |
    | - Live testing with all 3rd-party plugins active in a synchronized     |
    |   interactive staging environment                                      |
    +------------------------------------------------------------------------+
    | [PENDING PRODUCTION ACCESS]                                            |
    | - Final live server deployment of release v1.0.13 to the production    |
    |   Live hosting environment (server was serving previous version during audit)|
    | - Authenticated cache purging and post-deployment live DOM audit       |
    +------------------------------------------------------------------------+
    | [FUTURE / PHASE 2]                                                     |
    | - Advanced interactive photo-essay grid layouts for Disparo Crítico    |
    | - Live cloud TTS audio pipeline and article-grounded Q&A architecture  |
    +------------------------------------------------------------------------+

    17 — Results

    Rather than claiming unverified marketing metrics, results are reported based on verifiable technical and structural outcomes:

    Measured Results

  • 11 Truncated Articles Restored: Successfully recovered 100% of confirmed truncated investigative stories from the original REST API (IDs: 480, 481, 483, 486, 487, 489, 492, 493, 495, 498, 499).
  • 3 Major Investigative Series Sideloaded: Longform investigative multipart series fully recovered with all remote embedded imagery localized into the WordPress Media Library.
  • 0px Horizontal Overflow: Complete elimination of lateral scroll across audited viewports (320px, 390px, 768px, 1280px, 1440px).
  • 100% Test Pass Rate: Automated test suites (tests/homepage-copy.php and tests/theme-regression.php) pass with zero errors on PHP 8.2.
  • Lightweight Package Footprint: Production release ZIP engineered via allowlist packaging to a compact ~373 KB, excluding development bloat and private assets.
  • Zero Credential Leaks: Static regex security scan detected 0 hardcoded secrets, bearer tokens, or API credentials across the codebase.
  • Observed Results

  • Visual Atmosphere Preserved: Complete elimination of unstyled white container backgrounds in dark photojournalism features, replacing them with accessible, themed --disparo-card surfaces (#1c1917).
  • Clean Homepage Flow: Eradication of awkward whitespace gaps caused by unmapped categories or mismatched article counts.
  • Sanitized Excerpts: Removal of parásite camera credits and datelines from homepage summaries, restoring a professional journalistic voice.
  • Qualitative Results

  • Institutional Gravitas: The platform visibly communicates the authority of an investigative news organization rather than a generic blogging site.
  • Long-Term Maintainability: Clean separation of concerns allows newsroom editors to publish daily stories and multimedia packages without risking layout breakage.

  • 18 — Gallery / Evidence

    Evidencia visual forense y capturas de producción de la plataforma editorial Criterio.hn:

    Portada completa Criterio.hn rediseñada

    01 — Portada Completa: Rediseño Periodístico

    Captura de producción completa (10,500px). Demuestra la Apertura Rectora, Lo Esencial, módulo de investigación "En la Mira", sección multimedia y footer con newsletter estructurado.

    Maqueta previa oscura de Criterio.hn

    02 — Maqueta Previa: Esquema Oscuro

    Captura de la versión previa con fondo oscuro (#0F1115). Evidencia la carencia de jerarquía periodística tradicional y la necesidad de mayor contraste para investigación de largo aliento.

    Detalle de Cabecera y Apertura Rectora

    03 — Detalle de Cabecera y Apertura Rectora

    Composición editorial de cabecera con tipografía Playfair Display, cintillo institucional color vino (#911E2E), fecha canónica y bloque de tres notas secundarias con fotos en 16:10.

    Vista móvil responsiva de Criterio.hn

    04 — Adaptación Responsiva Móvil (390px / 480px)

    Validación móvil que certifica cero desbordamiento horizontal tras la normalización de contenedores Elementor y márgenes fluidos con clamp().


    19 — Closing Summary

    The Criterio.hn project exemplifies the intersection of editorial UX design, legacy data migration, and defensive WordPress engineering.

    Working on a living, historic publication with thousands of existing posts requires a fundamentally different mindset than building a greenfield website. It demands forensic auditing of existing database structures, respect for historical journalism, disciplined CSS engineering to neutralize legacy markup artifacts, and an uncompromising commitment to performance, accessibility, and reproducibility.

    By treating the publication as a comprehensive editorial system rather than a collection of static templates, the project established an architectural foundation that preserves Criterio.hn's investigative heritage while equipping the newsroom for the next decade of independent reporting.