Skip to content

Instantly share code, notes, and snippets.

@amElnagdy
Last active January 7, 2017 23:43
Show Gist options
  • Save amElnagdy/d4e72419294da18103053a4e6b948860 to your computer and use it in GitHub Desktop.
Save amElnagdy/d4e72419294da18103053a4e6b948860 to your computer and use it in GitHub Desktop.
Divi Builder on custom post types
<?php
// Divi Builder on custom post types
add_filter('et_builder_post_types', 'divicolt_post_types');
add_filter('et_fb_post_types','divicolt_post_types' ); // Enable Divi Visual Builder on the custom post types
function divicolt_post_types($post_types)
{
foreach (get_post_types() as $post_type) {
if (!in_array($post_type, $post_types) and post_type_supports($post_type, 'editor')) {
$post_types[] = $post_type;
}
}
return $post_types;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment