Hi Rafal,
I recommend contacting the SEO Press developer and force and have the suppress_filters
set to true for sitemap page. Our theme has this integration and it’s global
public function pre_get_posts( $query ) {
global $sitepress;
if ( ! is_callable( array( $sitepress, 'switch_lang' ) ) || ! is_callable( array( $sitepress, 'get_current_language' ) ) ) {
return $query;
}
if ( isset( $query->query_vars['cs_all_wpml'] ) && $query->query_vars['cs_all_wpml'] ) {
return $query;
}
// $sitepress->switch_lang( $sitepress->get_current_language() ); //Make sure that even custom query gets the current language
$query->query_vars['suppress_filters'] = false;
return $query;
}
If we globally change that on that part, it will then affect the integration of our theme to WPML.
And our theme doesn’t even no know which is the sitemap request since it’s not part of our theme, hence the condition and fix should be apply to sitemap request on their plugin.
if ( is_sitemap_page_request () ) { //Their sitemap condition here
$query->query_vars['suppress_filters'] = true;
}
If fact, they can modify the query entirely to include all posts regardless of language. It just happens the sitemap solely rely on default query controlled by WPML, hence suppressing any WPML feature have an effect too.
The reason it’s working on Twenty Ten is because it doesn’t have WPML integration.
Thanks!