Custom post type with custom fields


My plugin uses register_post_type to register a custom post type. It also has a few custom fields, which are being added via add_meta_boxes. So far so good.

But I’ve read that the supports array of the custom post type should contain ‘custom fields’ in order to support the REST API.

So I’ve added this while registering the post type. But now a new panel is added at the edit screen (Custom Fields), which contains a duplicate set of my custom fields. Doesn’t look nice, and I know I can hide this panel again. But that’s the only thing I can do, hide it? Is there a way to hide this panel by default?


Source link