brooklyndesignstudio

Renaming Project Custom Post Type

Sep 2nd, 2019
130
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // // RENAMING PROJECT CUSTOM POST TYPE TO CASE REVIEWS
  2.  
  3. function rename_project_cpt() {
  4.  
  5. register_post_type( 'project',
  6.     array(
  7.     'labels' => array(
  8.     'name'          => __( 'Case Reviews', 'divi' ),
  9.     'singular_name' => __( 'Case Review', 'divi' ),
  10.     ),
  11.     'has_archive'  => true,
  12.     'hierarchical' => true,
  13.     'menu_icon'    => 'dashicons-images-alt2',  // you choose your own dashicon
  14.     'public'       => true,
  15.    
  16.     'rewrite'      => array( 'slug' => 'case-reviews', 'with_front' => false ), // change the text portfolio to anything you like
  17.   'supports'     => array(),
  18.          
  19. ));
  20.     }
  21.  
  22. add_action( 'init', 'rename_project_cpt' );
RAW Paste Data