-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Patterns from the pattern directory do not show if placed in a template #64104
Copy link
Copy link
Open
Labels
Good First IssueAn issue that's suitable for someone looking to contribute for the first timeAn issue that's suitable for someone looking to contribute for the first time[Feature] Pattern DirectoryThe Pattern Directory, a place to find patternsThe Pattern Directory, a place to find patterns[Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsyncedA collection of blocks that can be synced (previously reusable blocks) or unsynced[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Metadata
Metadata
Assignees
Labels
Good First IssueAn issue that's suitable for someone looking to contribute for the first timeAn issue that's suitable for someone looking to contribute for the first time[Feature] Pattern DirectoryThe Pattern Directory, a place to find patternsThe Pattern Directory, a place to find patterns[Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsyncedA collection of blocks that can be synced (previously reusable blocks) or unsynced[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Fields
Give feedbackNo fields configured for issues without a type.
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:
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.
define( 'WP_DEVELOPMENT_MODE', 'theme' );For example in wp-config.php.<!-- wp:pattern {"slug":"clients-section"} /-->Screenshots, screen recording, code snippet
No response
Environment info
WordPress 6.6.1.
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.