Tell us what you are trying to do?
Create a custom post type of "Projects" however I am using Divi theme
Is there any documentation that you are following?
No because that is not the issue
I am using Divi which has it's own "projects" post type but I need to use "projects" in Toolset Types. Any idea how to get around this? I can't call the Types option anything else because it's used in an existing site which has a post type of "Projects" which I need to have for S.E.O. and other purposes, so I need to know how to rename or remove the Divi "projects" version...
I have used this code here: hidden link
and changed everything to "portfolio"
I save it in my child theme functions.php and there are no errors.
Yet when I try to create a "Projects" custom post type I get the same error (see attached image).
It took a long time for me to find the right option as renaming the Divi "Project" CPT never seemed to work with any option I found.
I found this article:
hidden link
And used this option "remove" as the "renaming" option still did not work.
//* Remove the Custom Post Types from the Divi Theme */
if ( ! function_exists( 'et_pb_register_posttypes' ) ) :
function et_pb_register_posttypes() {
global $wp_post_types;
if ( isset( $wp_post_types[ $post_type ] ) ) {
unset( $wp_post_types[ $post_type ] );
return true;
}
return false;
}
endif;
It would be nice (as Toolset is promoting the use of Divi theme) if the devs could come up with a way of doing this in Toolset settings. It's a small thing for Divi to do the same in their theme settings, however I won't hold my breath on them doing anything about it...