Created
June 14, 2018 21:10
-
-
Save freelancedaddytv/1f39028f2817e79406d5d523abc85947 to your computer and use it in GitHub Desktop.
Enable Divi Builder on All Custom Post Type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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