Created
August 6, 2021 16:08
-
-
Save Pebblo/b033ac5ceae674299197196753ee496c to your computer and use it in GitHub Desktop.
Example of how to filter the Divi 'Grab the first post image' option to disable it for EE post types.
This file contains 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 | |
add_filter('et_grab_image_setting', 'tw_ee_divi_et_grab_image_setting'); | |
function tw_ee_divi_et_grab_image_setting($setting) { | |
if( strpos(get_post_type(), 'espresso_') !== false ) { | |
return false; | |
} | |
return $setting; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment