# Doc C — WordPress Ecosystem: Development Guide for Claude Code **Version:** 1.0 **Date:** March 2026 **For:** Claude Code (Opus 4.6) in VSCode **Purpose:** Step-by-step implementation guide for the IGNY8 WordPress Plugin (free + connected), Companion Theme, and Toolkit Plugin — where every file goes, what it does, build sequence, and how it connects to the IGNY8 SaaS platform **Scope:** Plugin (14 modules, 10 build phases), Theme (7 CPTs, 9 taxonomies, 15 landing sections, 50+ block patterns, 5 starters, WooCommerce), Toolkit Plugin (5 modules) **Rule:** Plugin works with ANY theme. Theme works WITHOUT the plugin. Both work WITHOUT the IGNY8 SaaS platform. Connected mode enhances both but is never required. **Dependency:** Doc A (SAG Architecture) defines the blueprint/cluster data the plugin receives in connected mode. Doc B (Platform Modules) defines the IGNY8 SaaS features that push content/schemas/links to the plugin. --- ## Table of Contents 1. [Architecture Overview — Three Deliverables](#1-architecture-overview) 2. [Build Sequence — What Comes First](#2-build-sequence) 3. [IGNY8 Plugin — Foundation & Infrastructure](#3-plugin-foundation) 4. [IGNY8 Plugin — Module 1: SEO Core](#4-seo-core) 5. [IGNY8 Plugin — Module 2: Schema](#5-schema) 6. [IGNY8 Plugin — Module 3: Sitemap](#6-sitemap) 7. [IGNY8 Plugin — Module 4: Redirects](#7-redirects) 8. [IGNY8 Plugin — Module 5: Site Intelligence](#8-site-intelligence) 9. [IGNY8 Plugin — Module 6: Internal Linking](#9-internal-linking) 10. [IGNY8 Plugin — Module 7: GSC](#10-gsc) 11. [IGNY8 Plugin — Module 8: Socializer](#11-socializer) 12. [IGNY8 Plugin — Module 9: Analytics + SMTP](#12-analytics-smtp) 13. [IGNY8 Plugin — Module 10: Content Sync (Connected)](#13-content-sync) 14. [IGNY8 Plugin — Module 11: SAG Structure (Connected)](#14-sag-structure) 15. [IGNY8 Plugin — Setup Wizard & Import](#15-setup-wizard) 16. [IGNY8 Plugin — Data Architecture](#16-data-architecture) 17. [IGNY8 Plugin — REST API Endpoints](#17-rest-api) 18. [IGNY8 Plugin — Performance Rules](#18-performance) 19. [Theme — CPTs, Taxonomies, Meta Fields](#19-theme-structure) 20. [Theme — Term Landing Pages & SAG Templates](#20-term-templates) 21. [Theme — Landing Page Builder](#21-landing-pages) 22. [Theme — Block Patterns & Starter Templates](#22-patterns-starters) 23. [Theme — Interlinking Display Components](#23-interlinking-display) 24. [Theme — WooCommerce Integration](#24-woocommerce) 25. [Theme — Design System & Build Plan](#25-design-build) 26. [Toolkit Plugin — All 5 Modules](#26-toolkit) 27. [Free vs Premium Split](#27-free-premium) 28. [Theme ↔ Plugin Contract](#28-theme-plugin-contract) 29. [Plugin ↔ IGNY8 SaaS Communication](#29-saas-communication) --- ## 1. Architecture Overview — Three Deliverables {#1-architecture-overview} ``` ┌────────────────────────────────────────────────────────────┐ │ IGNY8 PLUGIN │ │ SEO Core, Schema, Sitemap, Redirects, Analytics, GSC, │ │ Site Intelligence, Internal Linking, Socializer, SMTP │ │ + Connected: Content Sync, SAG Structure │ │ │ │ Distribution: Free on WordPress.org │ │ Connected premium features via IGNY8 SaaS subscription │ │ Works with ANY theme │ └──────────────────────┬─────────────────────────────────────┘ │ reads plugin data via igny8() API ┌──────────────────────┴─────────────────────────────────────┐ │ COMPANION THEME │ │ 7 CPTs, 9 custom taxonomies, meta fields, SAG templates, │ │ term landing pages, landing page builder, 50+ patterns, │ │ 5 site-type starters, WooCommerce templates, design system │ │ │ │ Distribution: Free on WordPress.org (limited), Premium │ │ Works WITHOUT the plugin (graceful degradation) │ └──────────────────────┬─────────────────────────────────────┘ │ extends theme with infrastructure ┌──────────────────────┴─────────────────────────────────────┐ │ TOOLKIT PLUGIN │ │ Performance/Caching, Forms, Security, SMTP, WooCommerce │ │ │ │ Distribution: Free on WordPress.org (limited), Premium │ │ Works with ANY theme │ └────────────────────────────────────────────────────────────┘ ``` **Key principle:** Each piece works independently. Together they create the full SAG-optimized WordPress experience. --- ## 2. Build Sequence — What Comes First {#2-build-sequence} ``` PHASE 1 (Days 1-3) ─── Plugin Foundation │ Skeleton, module manager, admin menu, REST API base, │ setup wizard, database installer, compatibility layer PHASE 2 (Days 4-7) ─── SEO Core Module │ Meta box, title tags, meta description, content analysis, │ OG tags, breadcrumbs, robots.txt, verification codes PHASE 3 (Days 8-10) ─── Schema + Sitemap + Redirects │ JSON-LD schemas, XML sitemap, redirect manager, 404 monitor PHASE 4 (Days 11-13) ── Site Intelligence │ Site audit, orphan detection, thin content, cannibalization, │ cluster detection, intelligence dashboard PHASE 5 (Days 14-15) ── Internal Linking │ Link crawl, link audit, suggestions, link graph PHASE 6 (Days 16-18) ── Socializer + Analytics + SMTP │ Share buttons, social profiles, GA/GTM connector, │ pixel manager, SMTP override, GSC OAuth + dashboard PHASE 7 (Days 19-20) ── SEO Import │ Yoast, RankMath, AIOSEO importers PHASE 8 (Days 21-23) ── Connected Mode — Content Sync │ API client, content puller, mapper, sync queue, scheduler PHASE 9 (Days 24-27) ── Connected Mode — SAG Structure │ Blueprint sync, taxonomy builder, term builder, │ cluster manager, structure visualizer PHASE 10 (Days 28-30) ─ Polish + Package Cross-module testing, performance audit, WP.org compliance --- THEME BUILD (30 days, can overlap with plugin Phases 6+) --- THEME PHASE 1 (Days 1-3) Foundation (templates, design system, CSS) THEME PHASE 2 (Days 4-6) CPTs + Taxonomies + Meta Boxes THEME PHASE 3 (Days 7-9) Term Landing Page Templates THEME PHASE 4 (Days 10-11) Interlinking Display Components THEME PHASE 5 (Days 12-14) Landing Page Builder THEME PHASE 6 (Days 15-16) Single Templates (service, portfolio, docs) THEME PHASE 7 (Days 17-19) Custom Blocks + 50+ Patterns THEME PHASE 8 (Days 20-22) Site-Type Starters + WooCommerce THEME PHASE 9 (Days 23-27) Toolkit Plugin (all 5 modules) THEME PHASE 10 (Days 28-30) Setup Wizard + Polish --- THEME CAN START after Plugin Phase 5 (interlinking data contract defined) --- ``` --- ## 3. IGNY8 Plugin — Foundation & Infrastructure {#3-plugin-foundation} ### 3.1 Complete File Structure ``` igny8/ ├── igny8.php # Plugin header, bootstrap, constants ├── readme.txt # WordPress.org readme ├── uninstall.php # Full cleanup on uninstall │ ├── includes/ │ ├── class-igny8.php # Main singleton class │ ├── class-module-manager.php # Register, activate, deactivate modules │ ├── class-api-client.php # IGNY8 SaaS API client (connected mode) │ ├── class-connection.php # API key validation, connection status │ ├── class-utils.php # Shared utilities │ ├── class-ajax.php # Shared AJAX handler │ ├── class-rest-api.php # Plugin REST endpoints (for theme + external) │ ├── class-compatibility.php # Detect conflicting plugins, show notices │ │ │ ├── modules/ # 14 modules (see sections 4-14) │ │ ├── seo/ # SEO Core (Phase 2) │ │ ├── schema/ # Schema (Phase 3) │ │ ├── sitemap/ # Sitemap (Phase 3) │ │ ├── redirects/ # Redirects (Phase 3) │ │ ├── analytics/ # Analytics (Phase 6) │ │ ├── site-intelligence/ # Site Intelligence (Phase 4) │ │ ├── linking/ # Internal Linking (Phase 5) │ │ ├── gsc/ # Google Search Console (Phase 6) │ │ ├── socializer/ # Social sharing + posting (Phase 6) │ │ ├── smtp/ # Email delivery (Phase 6) │ │ ├── content-sync/ # [Connected] Content from IGNY8 (Phase 8) │ │ └── sag/ # [Connected] SAG structure (Phase 9) │ │ │ ├── admin/ # Admin UI infrastructure │ │ ├── class-admin-menu.php # Menu registration (top-level "IGNY8" menu) │ │ ├── class-dashboard.php # Main plugin dashboard page │ │ ├── class-setup-wizard.php # First-run wizard (6 steps) │ │ ├── class-compatibility-notice.php # Admin notices for conflicts │ │ ├── views/ # PHP templates for admin pages │ │ │ ├── dashboard.php │ │ │ ├── wizard/step-1 through step-6.php │ │ │ └── connect-prompt.php │ │ └── assets/ │ │ ├── admin.css, admin.js │ │ └── meta-box.css, meta-box.js │ │ │ ├── frontend/ │ │ ├── class-head-output.php # ALL
output (meta, schema, OG) in single hook │ │ ├── class-share-output.php # Share button HTML/CSS/JS (conditional) │ │ └── assets/ │ │ ├── share-buttons.css # <3KB, loaded only if share enabled │ │ └── share-buttons.js # <2KB, loaded only if share enabled │ │ │ ├── data/ │ │ ├── class-installer.php # Create all custom DB tables on activation │ │ ├── class-migrator.php # Version-based migration handler │ │ └── class-importer.php # Import from Yoast/RankMath/AIOSEO │ │ │ └── integrations/ │ ├── class-woocommerce.php # WooCommerce-specific SEO/schema │ └── class-theme-bridge.php # Data passing to companion theme │ └── languages/ └── igny8.pot # Translation template ``` ### 3.2 Module Manager Pattern Every module follows the same lifecycle: ```php // class-module-manager.php pattern class ModuleManager { private $modules = []; public function register($slug, $class, $options = []) { // Register module with slug, class path, free/connected flag } public function activate($slug) { // Enable module, call module's activate() method } public function deactivate($slug) { // Disable module, call module's deactivate() method } public function is_active($slug) { // Check igny8_active_modules option } public function boot_active_modules() { // Called on plugins_loaded — instantiate all active modules } } // Each module extends: abstract class IGNY8_Module { abstract public function get_slug(); abstract public function get_name(); abstract public function init(); // Hook registration public function activate() {} // On module enable public function deactivate() {} // On module disable public function is_connected_only() { return false; } } ``` ### 3.3 Admin Menu Structure ``` IGNY8 (top-level menu, dashicons-chart-area) ├── Dashboard # Plugin overview + connect prompt ├── SEO # SEO settings page ├── Schema # Schema settings ├── Sitemaps # Sitemap configuration ├── Redirects # Redirect manager + 404 log ├── Site Intelligence # Audit dashboard ├── Internal Links # Link audit + suggestions ├── Search Console # GSC connection + metrics ├── Socializer # Share buttons + accounts ├── Analytics # GA/GTM/pixel settings ├── SMTP # Mail settings ├── Settings # Global plugin settings │ └── (Connected only, appear after connection): ├── Content Sync # Sync dashboard └── SAG Structure # Blueprint + structure visualizer ``` ### 3.4 Public API Class The plugin exposes a global function for themes and other plugins: ```php function igny8() { return IGNY8::instance(); } // Usage by theme: if (function_exists('igny8')) { $title = igny8()->seo->get_title($post_id); $schema = igny8()->schema->get_json_ld($post_id); $breadcrumbs = igny8()->seo->get_breadcrumbs(); $related = igny8()->linking->get_related_links($post_id); $cluster_nav = igny8()->linking->get_cluster_navigation($post_id); $term_content = igny8()->seo->get_term_content($term_id); $share = igny8()->socializer->render_share_buttons($post_id); } ``` --- ## 4-12. Plugin Modules — Build Reference {#4-seo-core} Each module section below specifies: files to create, what each file does, which hooks it uses, what data it reads/writes, and how it connects to the IGNY8 SaaS platform in connected mode. ### Module 1: SEO Core (Phase 2, Days 4-7) **Files:** `modules/seo/` — 9 PHP files + 2 view templates (see file structure above) **What it does:** - `class-meta-box.php` — Adds SEO meta box below editor on all post types. Fields: focus keyword, SEO title (with SERP preview), meta description (with character counter), canonical URL, robots index/follow toggles. Saves to `_igny8_*` post meta keys. Connected enhancement: multi-keyword fields, cluster-aware scoring. - `class-title-tag.php` — Manages `