Skip to content

Instantly share code, notes, and snippets.

@cliffordp
Last active March 21, 2022 04:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cliffordp/718ec5fede29da940b5a2daaeb563817 to your computer and use it in GitHub Desktop.
Save cliffordp/718ec5fede29da940b5a2daaeb563817 to your computer and use it in GitHub Desktop.
Disable Divi's Project post type
<?php
add_action( 'init', 'cliff_remove_divi_project_post_type' );
if ( ! function_exists( 'cliff_remove_divi_project_post_type' ) ) {
/**
* Disable Divi's Project post type.
*
* Alternative option for post type (but not taxonomies): Use the 'et_builder_default_post_types' filter.
* wp-content/themes/Divi/includes/builder/core.php
*
* @link https://gist.github.com/cliffordp/718ec5fede29da940b5a2daaeb563817
*/
function cliff_remove_divi_project_post_type(){
unregister_post_type( 'project' );
unregister_taxonomy( 'project_category' );
unregister_taxonomy( 'project_tag' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment