Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Post Type: Products.
- */
- $labels = array(
- "name" => __( "Products", "twentytwo" ),
- "singular_name" => __( "Products", "twentytwo" ),
- );
- $args = array(
- "label" => __( "Products", "twentytwo" ),
- "labels" => $labels,
- "description" => "",
- "public" => true,
- "publicly_queryable" => true,
- "show_ui" => true,
- "delete_with_user" => false,
- "show_in_rest" => true,
- "rest_base" => "",
- "rest_controller_class" => "WP_REST_Posts_Controller",
- "has_archive" => true,
- "show_in_menu" => true,
- "show_in_nav_menus" => true,
- "exclude_from_search" => false,
- "capability_type" => "post",
- "map_meta_cap" => true,
- "hierarchical" => true,
- "rewrite" => array( "slug" => "products", "with_front" => true ),
- "query_var" => true,
- "supports" => array( "title", "editor", "thumbnail" ),
- "taxonomies" => array( "motorcycles_type" ),
- );
- register_post_type( "products", $args );
- }
- add_action( 'init', 'cptui_register_my_cpts' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement