Display Pattern Names within Editor Pattern Selector

admin2025-01-08  6

I am adding a pattern via the patterns folder. I have the title and slug set.

<?php
/**
 * Title: The Title I want to display
 * Slug: myTheme/pattern-name
 * Categories: myTheme
 * Block Types: core/navigation

 */

?>

I am using v3 of theme.json and have also registered the pattern there.

"patterns": [
  "myTheme/pattern-name"
]

The thing that's driving me crazy is that when a user goes to add a pattern in the editor it only shows the name on hover. Patterns created via the editor show their names right under the thumbnail. I am going to be creating a bunch of patterns and sometimes there will not be much visually to go on, as they might be something like just containers with classes. How do I get the name to display there to make it easier for the user to select the correct pattern?

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736266792a1148.html

最新回复(0)