Skip to content

Instantly share code, notes, and snippets.

@dietcheese
dietcheese / gist:3da849caf791be65b682cc384cfbeba8
Created April 21, 2022 20:32
Elementor: display post conditionally based upon whether it has a featured image
add_action( 'elementor/theme/register_conditions', function( $conditions_manager ) {
class Page_Template_Condition extends ElementorPro\Modules\ThemeBuilder\Conditions\Condition_Base {
public static function get_type() {
return 'singular';
}
public static function get_priority() {
return 30;
}