Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. /**
  2. * Post Type: Products.
  3. */
  4.  
  5. $labels = array(
  6. "name" => __( "Products", "twentytwo" ),
  7. "singular_name" => __( "Products", "twentytwo" ),
  8. );
  9.  
  10. $args = array(
  11. "label" => __( "Products", "twentytwo" ),
  12. "labels" => $labels,
  13. "description" => "",
  14. "public" => true,
  15. "publicly_queryable" => true,
  16. "show_ui" => true,
  17. "delete_with_user" => false,
  18. "show_in_rest" => true,
  19. "rest_base" => "",
  20. "rest_controller_class" => "WP_REST_Posts_Controller",
  21. "has_archive" => true,
  22. "show_in_menu" => true,
  23. "show_in_nav_menus" => true,
  24. "exclude_from_search" => false,
  25. "capability_type" => "post",
  26. "map_meta_cap" => true,
  27. "hierarchical" => true,
  28. "rewrite" => array( "slug" => "products", "with_front" => true ),
  29. "query_var" => true,
  30. "supports" => array( "title", "editor", "thumbnail" ),
  31. "taxonomies" => array( "motorcycles_type" ),
  32. );
  33.  
  34. register_post_type( "products", $args );
  35. }
  36.  
  37. add_action( 'init', 'cptui_register_my_cpts' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement