brooklyndesignstudio

Remove Divi Projects CPT

Aug 2nd, 2020
1,203
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*************************************************************************
  2. *********************** [ REMOVE PROJECTS CPT ] *************************/
  3.  
  4. function project_unset_post_type(){
  5.     global $wp_post_types;
  6.     if ( isset( $wp_post_types[ 'project' ] ) ) {
  7.         unset( $wp_post_types[ 'project' ] );
  8.         return true;
  9.     }
  10.     return false;
  11. }
  12. add_action('init','project_unset_post_type');
RAW Paste Data