Skip to content

Instantly share code, notes, and snippets.

@rmpel
Created December 1, 2016 16:37
Show Gist options
  • Select an option

  • Save rmpel/b33e83edbbd1265dd0d743134e88fa3b to your computer and use it in GitHub Desktop.

Select an option

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
<?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