Darn, it’s not convenient if we can’t automate properly…
For context, I tried adding some code that switches a post directly from the default editor to the Divi Builder. But the layout is still the same.
The code:
add_action('save_post', function($post_id, $post, $update) {
// we only want new posts (not updates) and standard posts
if ($post->post_type !== 'post' || $update) return;
// only act if the request is a REST request (Make uses the REST API)
if (! (defined('REST_REQUEST') && REST_REQUEST) ) return;
// exit if already enabled
if ('on' === get_post_meta($post_id, '_et_pb_use_builder', true)) return;
// enable the Divi Builder
update_post_meta($post_id, '_et_pb_use_builder', 'on');
}, 20, 3);
The problem has been there for several weeks while I’ve been testing. Surely about divi theme function. Maybe I should use HTTP instead of the native WordPress module ?
The latest version is now 1.6.3 … but that might not fix the problem.
It could just be a conflict between the Make connector and Divi. Unfortunately we’re not able to test with every WP plugin (and every possible configuration), so conflicts do sometimes crop up.
This is a perennial problem with WP itself, due to the plugin architecture.