Created
April 12, 2016 21:12
-
-
Save zstepek/a53eb92fec1bca0baac721dc03612696 to your computer and use it in GitHub Desktop.
Add this code to your functions.php file to enable Divi Builder on CPTs
This file contains hidden or 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
/********This function is used to display the pagebuilder option on the CPTs**********/ | |
add_filter('et_builder_post_types', 'mndsz_divi_admin_display_pagebuilder'); | |
function mndsz_divi_admin_display_pagebuilder($mndsz_post_types) | |
{ | |
$mndsz_get_custom_post_types = get_post_types(array('public' => true, '_builtin' => false)); | |
$new_post_types = array_merge($mndsz_post_types, $mndsz_get_custom_post_types); | |
return $new_post_types; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment