Shortcode for the withdrawal of the last entries in a multi-language website?

There is a multi-language website. You need to make a shortcode with its marking (the essence of this manipulation is to remove all of markup tags h*). Here's what I got, but the trouble is that the me displays posts in all languages mixed. How to make so that deduced the posts only in the language that is currently active on the site?
<?php
function recent_posts( ){
$args = array(
'numberposts' =--> 3,
'post_status' => 'publish',
);
$blogName = get_bloginfo('name');
$recent_posts = wp_get_recent_posts($args);
$return = '<div class="parallax-wrapper"><div class="wpb_column vc_column_container vc_col-sm-12"><div class="vc_column-inner "><div class="wpb_wrapper"><div class="ozy-news-bar"><ul>';
$return .= '<li><div class="h1 content-color-alternate">NEWS</div><div class="h2 content-color">' . $blogName . '</div><a href target="_self" class="generic-button">view ALL<i class="oic-outlined-iconset-140"> </i></a></li>';
 foreach($recent_posts as $post){
 $thumbnail = get_the_post_thumbnail( $post["ID"], array(250, 150), array('alt' => $post["post_title"], 'title' => $post["post_title"]) );
 $return .= '<li><div class="t h1">';
 $return .= $post["post_title"];
 $return .= '</div>';
 $return .= '<p>' . $post["post_content"] . '</p>';
 $return .= '<a href="' . get_permalink($post[" id"]) . '" title="'.$post[" post_title"].'">READ MORE ></a>';
 $return .= '</li>';
}
 $return .= '</ul></div></div></div></div></div>';
 return $return;
}
is the add_shortcode('recentPostsList', 'recent_posts');
?>
June 14th 19 at 20:23
1 answer
June 14th 19 at 20:25
Solution
Add the arguments to the query string:
'suppress_filters' => false
Thank you! - johanna70 commented on June 14th 19 at 20:28
in the future the plugin name should indicate, not all will guess that it is WPML. ) - Baylee_Kulas commented on June 14th 19 at 20:31

Find more questions by tags WordPress