On February 23, 2014 at 6:51 pm
@Cecilia open up functions.php and add this:
/***WPML Translation Shortcode****/
if(! function_exists('wpex_wpml_lang_translate')) {
function wpex_wpml_lang_translate( $atts, $content = null ) {
extract(shortcode_atts(array(
'lang' => '',
), $atts));
$current_lang = ICL_LANGUAGE_CODE; //get WPL current language
if($lang == $current_lang){
return do_shortcode($content);
}
}
add_shortcode('wpml_translate', 'wpex_wpml_lang_translate');
}
after this:
add_action( 'pre_get_posts', 'asteria_home_query' );