Created
December 1, 2016 16:37
-
-
Save rmpel/b33e83edbbd1265dd0d743134e88fa3b to your computer and use it in GitHub Desktop.
Use DIVI Page-Builder templates Globally - ALWAYS. With this, all post types use the same pool of section templates
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
| <?php | |
| /** | |
| * Adds a divi builder to given custom post types and globalize all section templates | |
| * | |
| * @return array All post-type-names | |
| * @uses get_post_types() | |
| */ | |
| function divi_overrule_post_types() { | |
| return get_post_types(); | |
| } | |
| add_filter( 'et_builder_post_types', 'divi_overrule_post_types', 100 ); | |
| add_filter( 'et_pb_show_all_layouts_built_for_post_type', 'divi_overrule_post_types', 100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment