Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How to create custom post type in WordPress?

user-image
Question added by Mohammad Abdullah , PHP Developer , SManik Technology Pvt Ltd
Date Posted: 2017/10/04
Mohammad Aslam
by Mohammad Aslam , Sr. Web & Mobile Developer , Sedar Decor Factory LLC.

Add Below code in active theme function.php file/ Our custom post type function function create_posttype() {       register_post_type( 'movies',      // CPT Options         array(             'labels' => array(                 'name' => __( 'CPT plural name' ),                 'singular_name' => __( 'CPT singular name' )             ),             'public' => true,             'has_archive' => true,             'rewrite' => array('slug' => 'CPT slug'),         )     ); } // Hooking up our function to theme setup add_action( 'init', 'create_posttype' );

More Questions Like This