Skip to content

Instantly share code, notes, and snippets.

@cliffordp

cliffordp/functions.php

Last active Apr 19, 2021
Embed
What would you like to do?
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