# BDMurphy BookShelf Template - Technical Specification v2.2.10 **WordPress Theme:** BDMurphy BookShelf **Plugin 1:** BD-BookShelfHelper (not yet implemented) **Plugin 2:** BD-BookShelf (not yet implemented) **Version:** 2.2.10 | June 2026 **Status:** Theme fully implemented. Plugins pending development. --- ## Table of Contents 1. [Project Overview](#1-project-overview) 2. [Theme - Global Layout](#2-theme---global-layout) 3. [Theme - Pages](#3-theme---pages) 4. [Design System](#4-design-system) 5. [Goodreads Widget (Theme-Built)](#5-goodreads-widget-theme-built) 6. [Plugin: BD-BookShelfHelper (Planned)](#6-plugin-bd-bookshelfhelper-planned) 7. [Plugin: BD-SimpleEmail (Planned)](#7-plugin-bd-simpleemail-planned) 8. [Implementation Standards](#8-implementation-standards) 9. [Current Build Status](#9-current-build-status) --- ## 1. Project Overview ### 1.1 Purpose This specification defines a custom WordPress theme and two companion plugins for author B.D. Murphy's website. The system allows the author to showcase books, publish blogs, manage reviews, and send newsletters with minimal technical knowledge required after initial setup. **Theme Name:** BDMurphy Bookshelf **Plugin 1:** BD-BookShelfHelper **Plugin 2:** BD-SimpleEmail ### 1.2 Deliverables - **WordPress Theme:** BDMurphy Bookshelf — custom theme, fully Customizer-driven - **Plugin: BD BookShelfHelper:** Book data, series, pen names, short links, review links, SEO, and platform integrations. Book data stored and managed in one place accessable everywhere. *(Planned)* - **Plugin: BD SimpleEmail:** Subscriber management and AI-assisted newsletter delivery *(Planned)* ### 1.3 Design Identity | Element | Specification | |---------|--------------| | Logo | Quill-pen hybrid icon with "B.D. Murphy" in serif text file: "Icon_Quill_BDMurphy_Black_WhtBG.jpg" | | Banner | Illustrated timeline banner (1538x250px), full-width on all pages | | Primary Color | Navy blue (#1B3A6B) | | Accent Color | Warm gold (#C8A96E) | | Background | Parchment (#F5F0E8) | | Heading Font | Playfair Display / Georgia fallback | | Body Font | Lato / Calibri fallback | ### 1.4 General Behavior All books and blog content displays in reverse chronological order by first-published date unless a manual sort position is assigned. Series content sorts by volume number within the series. UI chrome follows the site language setting; content stays in the language it was authored in. ### 1.5 WordPress Coding Standards Compliance All code complies with [WordPress Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/): - **PHP:** PSR-12 compatible with WordPress conventions - **JavaScript:** ES5+ with JSHint validation - **CSS:** WordPress CSS coding standards - **HTML:** Semantic HTML5, no inline styles except where unavoidable - **Text Domain:** `bd-murphy` for theme, `bd-bookshelfhelper` and `bd-simpleemail` for plugins --- ## 2. Theme - Global Layout ### 2.1 Header - Banner image (1538x250px) displayed at 100% viewport width on all pages - Default asset: `assets/images/banner.jpg` - Site logo via `add_theme_support('custom-logo')` - Default logo asset: `assets/images/Icon_Quill_BDMurphy_Black_WhtBG.jpg` - Admin bar offset handled via `body.admin-bar` rules ### 2.2 Navigation Menu - Registered via `register_nav_menus(['primary' => 'Primary Menu', 'footer' => 'Footer Menu'])` - **Default menu items:** Home, Books, Blogs, Reviews, About - Sticky behavior with gold top border on scroll - Hamburger menu on mobile (<768px) - Custom link fallback when no menu assigned ### 2.3 Footer - Three-zone layout: social icons, donate/utility links, footer links - **Footer links displayed as vertical list** (not jumbled) - Two widget areas: "Footer Left" and "Footer Right" - Sign-up prompt with link to /signup/ page (configurable show/hide) - Copyright notice with dynamic year ### 2.4 WordPress Customizer Settings | Setting | Function | Location | |---------|----------|----------| | Site title | `get_bloginfo('name')` | Settings > General | | Logo | `the_custom_logo()` | Customizer > Site Identity | | Banner | `get_header_image()` | Customizer > Header Image | | Background | Custom background | Customizer > Background | | Primary color | `get_theme_mod('primary_color', '#1B3A6B')` | Customizer > Colors | | Accent color | `get_theme_mod('accent_color', '#C8A96E')` | Customizer > Colors | | Heading font | `get_theme_mod('heading_font', 'Playfair Display')` | Customizer > Typography | | Body font | `get_theme_mod('body_font', 'Lato')` | Customizer > Typography | | Author name | `get_theme_mod('author_name', 'B.D. Murphy')` | Customizer > Author Book Settings | | Goodreads ID | `get_theme_mod('goodreads_author_id', '30469651')` | Customizer > Author Book Settings | | Amazon Author ID | `get_theme_mod('amazon_author_id', '30469651')` | Customizer > Author Book Settings | | Show Newsletter Signup | `get_theme_mod('show_newsletter_signup', true)` | Customizer > Display Options | | Show Sign Up Link | `get_theme_mod('show_signup_link', true)` | Customizer > Display Options | | Social Sharing | `get_theme_mod('share_facebook', true)` etc. | Customizer > Social Sharing | ### 2.5 Theme Options Admin Screen Settings saved via WordPress Settings API in `bdm_theme_options`: - Social media URLs (X/Twitter, Facebook, LinkedIn, Instagram) - Donation URLs (Buy Me a Coffee, PayPal) - Author photo (media attachment ID) - Sticky navigation toggle - Posts per page - Show read time toggle - Business information (for CAN-SPAM compliance) --- ## 3. Theme - Pages ### 3.1 Home Page (front-page.php) - Banner at 100% screen width - Navigation menu line (Home, Books, Blogs, Reviews, About) - Two-column layout: 66% content, 34% sidebar - Content via WordPress block editor - Sidebar contains Goodreads Books widget (fetches from Goodreads API) ### 3.2 Blog Page (/blog/) Template: `archive.php` or `home.php`. Lists posts with title, date, category, excerpt, featured image. Paginated (10 per page). Social sharing on individual posts. ### 3.3 Books Page (/books-2/) Template: `page-books.php`. Grid layout of book covers matching authorbdmurphy.com style. **Default behavior (no plugin):** Shows default example books with covers from uploaded images: - Pandemic Hacker - Pandemic Hacker 2 - The Last Dwarf - Deal Hunter - Nanite Evolution - Sidney and Watson: Time Detectives **With BD BookHelper plugin:** Shows books from the `book` custom post type. **No sidebar on Books page** (correct behavior per specification). ### 3.4 Individual Book Page (single-book.php) Full-width template with: - Language selector tabs (EN, FR, DE, ES, RU, ZH-S, IT, PT, JA) - Cover image (220x310px) - Title, pen name, series info - Ratings, format toggle, retailer links - Read preview, pull quotes, reviews - Share button (copies short URL) - Social sharing buttons **Short Link Access:** Books are accessible via short URLs using the slug defined in book metadata. URL pattern: `/{short-slug}` (e.g., `/ph/` for "Pandemic Hacker") ### 3.5 Reviews Page (/reviews/) Template: `page-reviews.php`. Two-column layout with review cards and Goodreads sidebar widget. ### 3.6 About Page (/about/) Template: `page-about.php`. Two-column layout: - **Left column:** Author bio content, awards section (if plugin active), donate buttons, signup prompt - **Right column (sidebar):** - Author photo (thumbnail size, circular crop) - Newsletter signup card (configurable show/hide) - **Goodreads Books widget** (below author photo, shows on all pages except Books) ### 3.7 Series Pages - Listing: `archive-series.php` at /series/ - Individual: `taxonomy-series.php` or `single-series.php` at /series/{slug}/ - Series nav item hidden when no series exist ### 3.8 Sign-up Page (/signup/) Template: `page-signup.php`. Email, first name, opt-in checkbox. Shortcode `[bdm_signup]` available. ### 3.9 Social Sharing Buttons Platforms: Facebook, X/Twitter, LinkedIn, WhatsApp, Copy Link. Uses Web Share API where available. Book pages share the short URL. ### 3.10 Utility Pages - Privacy Policy: standard WordPress page - Unsubscribe: single email input + one-click HMAC tokens - Contact: AJAX form with honeypot spam protection - 404: Custom error page with home link --- ## 4. Design System ### 4.1 Color Palette (CSS Custom Properties) ```css :root { --bdm-navy: #1B3A6B; --bdm-slate: #2E6DA4; --bdm-sky: #4A90D9; --bdm-gold: #C8A96E; --bdm-cream: #F5F0E8; --bdm-parchment: #EDE4D0; --bdm-body-text: #2C2C2C; --bdm-mid-grey: #555555; --bdm-light-grey: #888888; --bdm-active-green: #2D6A4F; } ``` ### 4.2 Typography - Headings: Playfair Display, Georgia, serif - Body: Lato, Calibri, sans-serif - Google Fonts loaded via `wp_enqueue_style()` with `display=swap` ### 4.3 Image Sizes | Size | Dimensions | Use | |------|-----------|-----| | shelf-thumb | 44x62px (crop) | Book shelf widget | | blog-thumb | 100x68px (crop) | Blog post thumbnails | | rev-thumb | 52x74px (crop) | Review page covers | | book-cover | 130x185px (crop) | All books page | | book-page-cover | 220x310px (crop) | Individual book page | | series-card | 400x280px (crop) | Series listing | | series-header | 1200x300px (crop) | Series header | ### 4.4 Responsive Breakpoints | Breakpoint | Layout | |------------|--------| | >=1200px | Full two-column, desktop nav | | 768-1199px | Single column, hamburger menu | | <768px | Single column, touch-friendly targets (44x44px min) | ### 4.5 Banner Behavior - Full viewport width on all pages using `width: 100vw; margin-left: calc(-50vw + 50%)` - Max height: 200px with object-fit: cover - Consistent across all page templates --- ## 5. Goodreads Widget (Theme-Built) ### 5.1 Overview The Goodreads widget is built directly into the theme (not dependent on plugins). It fetches books from the author's Goodreads page and displays them in the sidebar. ### 5.2 Widget Behavior - **Widget name:** BDM_Goodreads_Books_Widget - **Widget title:** "GoodReads for {author_name}" (configurable) - **Sidebar assignment:** `home-sidebar` (used on all pages except Books) ### 5.3 Data Sources 1. **BD BookHelper Plugin (if active):** Queries `book` CPT for local book data 2. **Goodreads Fallback (no plugin):** Fetches from `https://www.goodreads.com/author/list/{author_id}` ### 5.4 Goodreads Integration Details - **Author ID:** 30469651 (configurable via Customizer) - **Fetch method:** `wp_remote_get()` with 10-second timeout - **HTML parsing:** DOMDocument with XPath queries - **Data extracted:** Title, cover image, URL, rating - **Sort order:** By review count descending (most reviews first) - **Max books displayed:** 6 ### 5.5 Widget Display ```html
``` ### 5.6 Page Visibility | Page | Widget Shown | |------|--------------| | Home | Yes | | Books | **No** (correct behavior) | | Blogs | Yes | | Reviews | Yes | | About | Yes (under author photo) | | Individual Book | Yes | | Individual Review | Yes | | Contact | Yes | | Signup | Yes | | 404 | No | --- ## 6. Plugin: BD-BookShelfHelper (Planned) ### 6.1 Overview Manages all book-related data, series information, and pen name configuration. Registers "book" custom post type and "series" taxonomy. ### 6.2 Book Data Entry **6.2.1 Data Entry Interface** The plugin provides a dedicated book data entry page with the following UI requirements: - **Input Fields:** Each data field has a dedicated input control (text, textarea, select, date picker as appropriate) - **Labels:** Every field has a visible label using `