Skip to content

Instantly share code, notes, and snippets.

@freelancedaddytv
Created June 14, 2018 21:10
Show Gist options
  • Save freelancedaddytv/1f39028f2817e79406d5d523abc85947 to your computer and use it in GitHub Desktop.
Save freelancedaddytv/1f39028f2817e79406d5d523abc85947 to your computer and use it in GitHub Desktop.
Enable Divi Builder on All Custom Post Type
// paste the code in divi functions.php or upload this file on wp-contents/mu-plugins
function divi_wp_post_types( $custom_post_types ) {
$custom_post_types = get_post_types();
if ( $custom_post_types ) {
foreach ( $custom_post_types as $custom_post_type ) {
$$custom_post_types[] ='$$custom_post_type';
return $$custom_post_types;
}
}
}
add_filter( 'et_builder_post_types', 'divi_wp_post_types' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment