Skip to content

Instantly share code, notes, and snippets.

@marklchaves
Last active January 19, 2023 11:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save marklchaves/8556c81fa103946af1643158fc81e770 to your computer and use it in GitHub Desktop.
Save marklchaves/8556c81fa103946af1643158fc81e770 to your computer and use it in GitHub Desktop.
Disable Popup Maker if Using Divi Builder
<?php // Ignore this first line when copying to your child theme's functions.php file.
/**
* Disable Popup Maker if Using Divi Builder
*
* Reference https://github.com/stefanoferrario/Extra/blob/e5eb5b20e6165ee989b8538f8eebbcddd24ce4b7/core/functions.php#L353
*/
add_action( 'wp', function() {
if ( ! function_exists( 'et_core_is_fb_enabled' ) ) return;
if ( et_core_is_fb_enabled() ) {
echo '<h4 style="position: absolute; z-index: 100000;">Divi Builder is enabled! Popup Maker is disabled.</h4>'; // Remove for production.
add_filter ( 'pum_popup_is_loadable', function($is_loadable) {
$is_loadable = false;
return $is_loadable;
} );
} // if
} );
@zeshanshani
Copy link

@marklchaves great stuff! Thanks for the code

@marklchaves
Copy link
Author

Hi @zeshanshani,

My pleasure. Glad you like it ;-)

Cheers!

@ashdowntech
Copy link

This is brilliant! Using the Divi Visual Builder was impossible if there was a pop-up defined for the page in question. This addresses exactly that issue. Many thanks!

@marklchaves
Copy link
Author

Hi @ashdowntech,

Awesome! Glad it helps 🙏🏽

Thanks so much for your comment.

@brianshim
Copy link

Thanks, very useful!!

@marklchaves
Copy link
Author

Thanks, very useful!!

Hey @brianshim, much appreciated 😌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment