Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'init', 'create_post_type' );
- function create_post_type() {
- register_post_type( 'mycpt',
- array(
- 'labels' => array(
- 'name' => __( 'CPTs', 'wpml_dev' ),
- 'singular_name' => __( 'CPT', 'wpml_dev' )
- ),
- 'public' => true,
- 'has_archive' => true,
- 'publicly_queryable' => true,
- 'exclude_from_search' => false,
- 'show_ui' => true,
- 'show_in_menu' => true,
- 'has_archive' => true,
- 'query_var' => true,
- 'rewrite' => array('slug' => _x( 'mycpt', 'URL slug', 'wpml_dev' )),
- 'supports' =>array('title','editor', 'custom-fields','thumbnail')
- )
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement