Unexpected error when activated for custom post type
-
I have a custom post type on my site called “recipe”. It’s note very different from a normal post. When I enable the subtitle support for recipes and try to open one of my recipes,
I get the following error:
“The editor has encountered an unexpected error.”
This is the code for my custom post type, if it helps:
function si_recipe_post_type() { $labels = array( 'name' => _x('Recipes', 'Post type general name', 'si-extend'), 'singular_name' => _x('Recipe', 'Post type singular name', 'si-extend'), 'menu_name' => _x('Recipes', 'Admin Menu text', 'si-extend'), ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'menu_position' => 6, 'menu_icon' => 'dashicons-list-view', 'show_in_rest' => true, 'supports' => array('title', 'editor', 'thumbnail', 'comments', 'excerpts', 'revisions'), 'show_ui' => true, 'show_in_menu' => true, ); register_post_type('recipe', $args); } add_action('init', 'si_recipe_post_type');
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Unexpected error when activated for custom post type’ is closed to new replies.