• Hi there,

    It’s great that we can create custom patterns in the site editor, but is there a way to assign the block type?
    If using php to register a pattern (using register_block_pattern() ), there is a ‘blockTypes’ property.
    There’s only the ‘name’ and ‘categories’ fields when you create a pattern in the site editor, so is there a way to assign block types?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can use the register_block_pattern_category() function to register a new pattern category. Click Here to read the full article .

    • This reply was modified 5 months, 2 weeks ago by GS.
    Thread Starter rose18

    (@rose18)

    Thanks @gswebdev , but I don’t think using register_block_pattern_category() will help. I’m using the site editor to create patterns:

    I’m able to add a NAME and assign block pattern CATEGORIES, but not BLOCK TYPES, such as ‘core/query’, ‘core/post-content’.


    If registering a pattern using php, assigning block types is possible, like below. But I want to assign block types if patterns are created from the site editor

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.