Extend post type support for existing CPTs

if you want to extend existing custom post type support use this small function which hooks into the cpt init and add your desired meta boxes.

/**
 * Snippet Name: Extend post type support for existing CPTs
 * Snippet URL: https://www.wpcustoms.net/snippets/extend-post-type-support-existing-cpts/
 */
  function wpc_custom_posttype_init() {
  add_post_type_support( 'movies', array( 'page-attributes', 'comments', 'author' ) );
}
add_action('init', 'wpc_custom_posttype_init'); 

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x