Advertisement
alaminlink

Custom Post Query Wordpress

Sep 9th, 2014
369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.67 KB | None | 0 0
  1.  
  2.  
  3.     /* Register Custom Post Types********************************************/
  4.      
  5.             add_action( 'init', 'create_post_type' );
  6.             function create_post_type() {
  7.                     register_post_type( 'testimonial',
  8.                             array(
  9.                                     'labels' => array(
  10.                                             'name' => __( 'Testimonial' ),
  11.                                             'singular_name' => __( 'Testimonial' ),
  12.                                             'add_new' => __( 'Add New' ),
  13.                                             'add_new_item' => __( 'Add New Testimonial' ),
  14.                                             'edit_item' => __( 'Edit Testimonial' ),
  15.                                             'new_item' => __( 'New Testimonial' ),
  16.                                             'view_item' => __( 'View Testimonial' ),
  17.                                             'not_found' => __( 'Sorry, we couldn\'t find the Testimonial you are looking for.' )
  18.                                     ),
  19.                             'public' => true,
  20.                             'publicly_queryable' => false,
  21.                             'exclude_from_search' => true,
  22.                             'menu_position' => 14,
  23.                             'has_archive' => false,
  24.                             'hierarchical' => false,
  25.                             'capability_type' => 'page',
  26.                             'rewrite' => array( 'slug' => 'testimonial' ),
  27.                             'supports' => array( 'title', 'editor', 'custom-fields' )
  28.                             )
  29.                     );
  30.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement