Snippets: Disable Image Overlays on Mobile

// Example 1: Disable for all overlays
add_filter( 'wpex_overlay_mobile_support', '__return_false' );

// Example 2: Disable on homepage only
add_filter( 'wpex_overlay_mobile_support', function( $support, $style ) {
	if ( is_front_page() ) {
		$support = false;
	}
	return $support;
}, 10, 2 );

// Example 3: Disable for a specific overlay style
add_filter( 'wpex_overlay_mobile_support', function( $support, $style ) {
	if ( 'hover-button' == $style ) {
		$support = false;
	}
	return $support;
}, 10, 2 );

Snippet Type: PHP

Posted Under: Other

All PHP snippets should be added via a child theme's functions.php file.