Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
Patterns from the pattern directory do not show if placed in a template | GoodFirstPicks

Patterns from the pattern directory do not show if placed in a template

WordPress/gutenberg 11 comments 1mo ago
View on GitHub
mediumopenScope: somewhat clearSkill match: maybeWordPressJavaScriptReact

Why this is a good first issue

Patterns from the directory fail to render on the frontend when added directly to template files.

AI Summary

The issue involves patterns from the pattern directory not rendering on the frontend when added directly to template HTML files, despite showing correctly in the editor. The problem appears to be related to how templates are saved and rendered, potentially involving database interactions or template rendering logic. Further investigation is needed to pinpoint the exact cause.

Issue Description

Description

I encountered this in a custom theme but I can also reproduce it with Twenty Twenty-Four, with no plugins installed. I only tested on WP 6.6.1.

Twenty Twenty-Four enables these two patterns from the pattern directory in theme.json:

	"patterns": [
		"three-columns-of-services",
		"clients-section"
	],

The theme then uses the clients section pattern inside twentytwentyfour/page-about-business.

When I create a new page and select the "About" business pattern, the remote pattern displays correctly in both the editor and front.

But if I edit a template HTML file and include the clients section or any other pattern from the pattern directory, the pattern only shows in the editor.

Step-by-step reproduction instructions

These example instructions uses Twenty Twenty-Four, but it can be reproduced in other block themes.

  1. Activate Twenty Twenty-Four.
  2. Set reading settings to displaying the latest posts.
  3. Make sure there are no template changes saved that can interfere when you edit the HTML template directly.
  4. You may also want to consider enabling the theme development mode constant WP_DEVELOPMENT_MODE. define( 'WP_DEVELOPMENT_MODE', 'theme' ); For example in wp-config.php.
  5. Open home.html in your code editor. Add the pattern to the template and save: <!-- wp:pattern {"slug":"clients-section"} /-->
  6. Go to Appearance > Editor.
  7. Confirm that the pattern is showing in the Site Editor.
  8. View the homepage on the front of the site. Confirm that the pattern is not showing.

Screenshots, screen recording, code snippet

No response

Environment info

WordPress 6.6.1.

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

GitHub Labels

[Type] BugGood First Issue[Status] In Progress[Feature] Patterns[Feature] Pattern Directory

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 20 points when you complete it!

Risk Flags

  • potential database interaction
  • template rendering logic
Loading labels...

Details

Points20 pts
Difficultymedium
Scopesomewhat clear
Skill Matchmaybe
Test Focusedno