Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Auto-enable Divi Page Builder on all public custom post types (WooCommerce, LearnPress etc)
// copy function into functions.php
function dpb_all_post_types( $post_types ) {
$args = array(
'public' => true,
'_builtin' => true
$output = 'names';
$post_types = get_post_types( $args, $output );
if ( $post_types ) { // If custom post types are present
foreach ( $post_types as $post_type ) {
$post_types[] ='$post_type';
return $post_types;
add_filter( 'et_builder_post_types', 'dpb_all_post_types' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.