Title: Error with core patterns
Last modified: June 4, 2022

---

# Error with core patterns

 *  Resolved [dareadel](https://wordpress.org/support/users/h2ofilters/)
 * (@h2ofilters)
 * [4 years ago](https://wordpress.org/support/topic/error-with-core-patterns/)
    - I created a custom post type and added support for patterns.
    - I created and added a restaurant-single.php inc/patterns folder.
    - I also added restaurant-single file to patterns folder.
    - I then created this code:
 *     ```
       // Register Custom Post Type
       function register_restaurant_post_type()
       {
       	$args = array(
       		'public' => true,
       		'label'  => 'Restaurant',
       		'menu_icon' => 'dashicons-food',
       		'show_in_rest' => true,
       		'supports'    => array('featured-image', 'thumbnail', 'custom-fields', 'excerpt', 'title', 'editor'),
       		'template' => array(
       			array('core/patterns', array(
       				'slug' => 'twentytwentytwo/restaurant-single',
       			)),
       		),
       	);
       	register_post_type('restaurant', $args);
       }
       add_action('init', 'register_restaurant_post_type');
       ```
   
 * But unfortunately I was getting the following error message while to created 
   a post in Restaurant:
 * > Your site doesn’t include support for the “core/patterns” block. You can leave
   > this block intact or remove it entirely.
 * I am not sure what is missing. If I comment out
 *     ```
       'template' => array(
       			array('core/patterns', array(
       				'slug' => 'twentytwentytwo/restaurant-single',
       			)),
       		),
       ```
   
 * the error goes away but then it will defeats the purpose of creating a reusable
   pattern.
 * I am not sure why it’s saying the “site doesn’t include support for the core/
   patterns block.” I will appreciate some help.
    -  This topic was modified 4 years ago by [dareadel](https://wordpress.org/support/users/h2ofilters/).
    -  This topic was modified 4 years ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
      Reason: Moved to Fixing WordPress, this is not an Everything else WordPress
      topic

Viewing 1 replies (of 1 total)

 *  Thread Starter [dareadel](https://wordpress.org/support/users/h2ofilters/)
 * (@h2ofilters)
 * [4 years ago](https://wordpress.org/support/topic/error-with-core-patterns/#post-15709399)
 * I found the error. Instead of `core/pattern` I wrote `core/patterns`

Viewing 1 replies (of 1 total)

The topic ‘Error with core patterns’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [dareadel](https://wordpress.org/support/users/h2ofilters/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/error-with-core-patterns/#post-15709399)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
