Advertisement
brooklyndesignstudio

Renaming Project Custom Post Type

Sep 2nd, 2019
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.64 KB | None | 0 0
  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' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement