Snippets: Show Different Sliders For Polylang

// This is just an example...you will probably want to adjust to also check for the current page or other
// conditionals based on where your slider is located.
function my_polylang_slider( $slider ) {
	if ( function_exists( 'pll_current_language' ) ) {
		$lang = pll_current_language();
		if ( 'es' == $lang ) {
			$slider = '[rev_slider alias="prensa"]';
		} elseif ( 'cat' == $lang ) {
			$slider = '[rev_slider alias="premsa-cat"]';
		}
	}
	return $slider;
}
add_filter( 'wpex_post_slider_shortcode', 'my_polylang_slider' );
All PHP snippets should be added via a child theme's functions.php file.