Sites in SHE Media using Divi might see SHE Media's ads load in the Live Preview.
Divi has helpfully provided us with some code to avoid this happening.
Navigate to Snippets and add a new Snippet that will Run everywhere. In the Code section paste the following:
function insert_disable_ads_script_in_footer() {
// Check if the et_fb parameter is in the URL
if (isset($_GET['et_fb'])) {
echo '<script type="text/javascript" data-cfasync="false">
var blogherads = blogherads || {};
blogherads.adq = blogherads.adq || []
blogherads.adq.push(function() {
blogherads.disableAds();
});
</script>';
}
}
add_action('wp_footer', 'insert_disable_ads_script_in_footer');
This will block the ads from running in the Life Preview. If you have any questions/issues - we recommend that you reach out to Divi support for assistance.
Comments
0 comments
Article is closed for comments.