While working on the WordPress website it’s almost impossible to skip creating meta boxes. The meta box is helpful for storing metadata about your page, post, or custom post types.

true, 'label' => __( 'Team', 'surana' ), 'menu_icon' => 'dashicons-admin-users', 'show_in_rest' => true, 'has_archive' => true, 'supports' => array('title', 'editor', 'custom-fields'), // here custom-fields is compulsory 'rewrite' => array('slug' => 'team', 'with_front' => false), ); register_post_type( 'team', $args ); register_meta( 'post', 'designation', // meta key array( 'object_subtype' => 'team', // post type name here 'type' => 'string', 'single' => true, 'show_in_rest' => true, ) ); register_meta( 'post', 'degree', array( 'object_subtype' => 'team', 'type' => 'string', 'single' => true, 'show_in_rest' => true, ) ); register_meta( 'post', 'social_links', array( 'object_subtype' => 'team', 'type' => 'array', 'single' => true, 'default' => array(), 'show_in_rest' => array( 'schema' => array( 'type' => 'array', 'items' => array( 'type' => 'object', 'properties' => array( 'facebook' => array( 'type' => 'string' ), 'linkedin' => array( 'type' => 'string' ), ), )
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners