diff --git a/CHANGELOG.md b/CHANGELOG.md index b78e48e..9ab7ed1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. +## [1.0.2] - 2026-02-10 + +### Fixed + +- Missing HTML `` tag on all pages — theme never declared `add_theme_support('title-tag')`, so WordPress's `_wp_render_title_tag()` hook was inactive during `wp_head()` output in Twig templates + ## [1.0.1] - 2026-02-09 ### Added diff --git a/CLAUDE.md b/CLAUDE.md index ee5f3e8..085bb08 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -34,7 +34,7 @@ This project is proudly **"vibe-coded"** using Claude.AI - the entire codebase w **Note for AI Assistants:** Clean this section after the specific features are done or new releases are made. Effective changes are tracked in `CHANGELOG.md`. Do not add completed versions here - document them in the Session History section at the end of this file. -Current version is **v1.0.1**. See `PLAN.md` for details. +Current version is **v1.0.2**. See `PLAN.md` for details. ## Technical Stack @@ -193,6 +193,28 @@ Build steps (in order): ## Session History +### Session 10 — v1.0.2 Title Tag Fix (2026-02-10) + +**Completed:** Fixed missing HTML `<title>` tag on all pages rendered by the theme's Twig pipeline. + +**What was fixed:** + +- Added `add_theme_support('title-tag')` to `wp_bootstrap_setup()` in `functions.php` + +**Root cause:** + +- The theme's `base.html.twig` calls `{{ wp_head() }}` which fires the `wp_head` action +- WordPress hooks `_wp_render_title_tag()` to `wp_head` at priority 1, which outputs the `<title>` tag +- However, this hook only fires when the theme declares `add_theme_support('title-tag')` +- The theme never made this declaration, so `wp_head()` output included styles and scripts but no `<title>` element +- All pages rendered by `TemplateController` (via `base.html.twig`) were affected + +**Key learnings:** + +- `add_theme_support('title-tag')` is required even for themes that render `wp_head()` via Twig — WordPress does not output `<title>` without it +- The absence of a `<title>` tag is invisible in the rendered page but affects SEO, browser tab display, and bookmarking +- This support declaration has been standard since WordPress 4.1 and should always be included in `after_setup_theme` + ### Session 9 — v1.0.1 Bootstrap Icons (2026-02-09) **Completed:** Bootstrap Icons web font integration via SCSS build pipeline. diff --git a/functions.php b/functions.php index c4da2da..03834c3 100644 --- a/functions.php +++ b/functions.php @@ -23,6 +23,9 @@ if ( file_exists( get_template_directory() . '/vendor/autoload.php' ) ) { */ if ( ! function_exists( 'wp_bootstrap_setup' ) ) : function wp_bootstrap_setup() { + // Add support for automatic document title tag. + add_theme_support( 'title-tag' ); + // Add support for post formats. add_theme_support( 'post-formats', array( 'aside', 'audio', 'chat', 'gallery', 'image', diff --git a/style.css b/style.css index ff0f61e..ea3de58 100644 --- a/style.css +++ b/style.css @@ -7,7 +7,7 @@ Description: A modern WordPress Block Theme built from scratch with Bootstrap 5. Requires at least: 6.7 Tested up to: 6.7 Requires PHP: 8.3 -Version: 1.0.1 +Version: 1.0.2 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: wp-bootstrap