Skip to content

Instantly share code, notes, and snippets.

@hbaker
Last active November 29, 2017 07:06
Show Gist options
  • Save hbaker/121ef70f0ee2907dc13936b13bf899e0 to your computer and use it in GitHub Desktop.
Save hbaker/121ef70f0ee2907dc13936b13bf899e0 to your computer and use it in GitHub Desktop.
Divi Theme - Add Divi Builder to Custom Post Types
// ADD DIVI BUILDER TO CUSTOM POST TYPES
function ze_builder_cpt( $post_types ) {
$post_types[] = 'your_custom_post_type_slug';
return $post_types;
}
add_filter( 'et_builder_post_types', 'ze_builder_cpt' );
// END ADD DIVI BUILDER TO CUSTOM POST TYPES
@hbaker
Copy link
Author

hbaker commented Nov 29, 2017

How to Add Divi Builder to Custom Post Types

This snippet assumes you are using the Divi theme in WordPress, and you have a custom post type that you would like to add Divi Builder functionality to.

  1. Add the code above to the bottom of your functions.php file
  2. Change your_custom_post_type_slug to the name of your custom post type slug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment