sushma_proach

Create custom post type code

Apr 29th, 2016
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.30 KB | None | 0 0
  1. add_action( 'init', 'create_post_type' );
  2. function create_post_type() {
  3.   register_post_type( 'acme_product',
  4.     array(
  5.       'labels' => array(
  6.         'name' => __( 'Products' ),
  7.         'singular_name' => __( 'Product' )
  8.       ),
  9.       'public' => true,
  10.       'has_archive' => true,
  11.     )
  12.   );
  13. }
Add Comment
Please, Sign In to add comment