Skip to content

Add block theme support and fix classic theme template issues - #56

Merged
fumikito merged 10 commits into
mainfrom
feature/support-block-theme
Jan 19, 2026
Merged

Add block theme support and fix classic theme template issues#56
fumikito merged 10 commits into
mainfrom
feature/support-block-theme

Conversation

@fumikito

@fumikito fumikito commented Jan 19, 2026

Copy link
Copy Markdown
Member

Summary

Changes

Block Theme Support (#55)

  • Add filter_block_template_include() method to override block templates for taxonomy archives
  • Use get_block_template() and get_block_file_template() for database and file-based templates
  • Remove block theme warning message from admin notices
  • Taxonomy pages now work correctly with block themes like Twenty Twenty-Five

Classic Theme Fix (#54)

  • Add single_template filter alongside singular_template
  • WordPress template hierarchy calls single_template before singular_template, so both filters are needed

Documentation

  • Update README.md to indicate plugin works with both classic and block themes
  • Fix template hierarchy order: single.php comes before singular.php

Test plan

  • Test with block theme (e.g., Twenty Twenty-Five): category page should use the same template as taxonomy-page
  • Test with classic theme that has single.php: custom template should be applied
  • Verify no block theme warning appears in admin

🤖 Generated with Claude Code

fumikito and others added 10 commits January 16, 2026 18:28
… separate deploy workflow

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
…to release

Co-authored-by: Claude <noreply@anthropic.com>
- Add filter_block_template_include() to override block templates for taxonomy archives
- Use get_block_template() and get_block_file_template() for database and file templates
- Remove block theme warning message from admin notices
- Taxonomy pages now work correctly with block themes like Twenty Twenty-Five

Co-authored-by: Claude <noreply@anthropic.com>
Add single_template filter alongside singular_template to ensure
custom template assignment works when the theme has single.php.

WordPress template hierarchy calls single_template before singular_template,
so both filters are needed for complete coverage.

Fixes #54

Co-authored-by: Claude <noreply@anthropic.com>
- Update note to indicate plugin works with both classic and block themes
- Fix template hierarchy order: single.php comes before singular.php

Co-authored-by: Claude <noreply@anthropic.com>
- Remove deprecated rules (number-leading-zero, declaration-property-unit-whitelist)
- Add @at-root to ignored at-rules for Sass support

Co-authored-by: Claude <noreply@anthropic.com>
- Update test workflow node_version from 18 to 20
- Update package.json engines from >=18.0 to >=20.0

glob@11.1.0 requires Node 20 or >=22

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@fumikito
fumikito merged commit 10a72b5 into main Jan 19, 2026
7 checks passed
@fumikito
fumikito deleted the feature/support-block-theme branch January 19, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant