Description
When registering a new pattern category with / as per Developer Docs, i.e themeslug/custom and when I select "Add new pattern" and select the category from the list, the slug is themeslug-custom which is a new category(duplicate) with same Name.
This has been reported in Trac Ticket; as per suggestion reporting the issue here.
Step-by-step reproduction instructions
- Register a block pattern category and pattern as per docs,
add_action( 'init', 'themeslug_register_pattern_categories' );
function themeslug_register_pattern_categories() {
register_block_pattern_category( 'themeslug/custom', array(
'label' => __( 'Theme Name: Custom', 'themeslug' ),
'description' => __( 'Custom patterns for Theme Name.', 'themeslug' )
) );
}
Now try adding the themeslug/custom category to any block pattern:
<?php
/**
* Title: Hero
* Slug: themeslug/hero
* Categories: featured, themeslug/custom
*/
?>
<!-- Your block markup goes here. -->
- Go to Appearance > Editor > Patterns and select the specific pattern (the slug is
themeslug%2Fcustom)
- Select "Add new pattern" or Duplicate any existing pattern
- And select
Theme Name: Custom category from the list,
- The pattern will have a new category assigned and the slug will be
themeslug-custom
- Will have two categories with the same name but with different slugs.
Screenshots, screen recording, code snippet

Environment info
- WordPress: 6.8-alpha
- Theme: Twenty Twenty-Four
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
Description
When registering a new pattern category with
/as per Developer Docs, i.ethemeslug/customand when I select "Add new pattern" and select the category from the list, the slug isthemeslug-customwhich is a new category(duplicate) with same Name.This has been reported in Trac Ticket; as per suggestion reporting the issue here.
Step-by-step reproduction instructions
Now try adding the themeslug/custom category to any block pattern:
themeslug%2Fcustom)Theme Name: Customcategory from the list,themeslug-customScreenshots, screen recording, code snippet
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.