Skip to content Skip to sidebar

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Long Nguyen 1 year, 11 months ago.

Assisted by: Long Nguyen.

Author Posts
August 7, 2023 at 3:39 pm #14165021

miguelA-35

Tell us what you are trying to do?
filter post by current lang

Is there any documentation that you are following?
no

Is there a similar example that we can see?
$args = array(
'post_type' => 'jobs',
'current' => max( 1, $paged ),
'paged' => $paged,
'posts_per_page' => 30,
'post__not_in' => $exclude,
'suprime_filters' => 0
);
$myPosts = new WP_Query($args);

What is the link to your site?
hidden link

Captura de tela 2023-08-07 163422.png
August 9, 2023 at 2:19 am #14172683

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Miguel,

Thanks for contacting WPML support.

You are using a custom query to display posts on your site. I would like to inform you that helping you with custom code, is out of the scope of WPML. But I suggest you can correct the argument: "suprime_filters" to "suppress_filters" and recheck this issue.

Refer to the documentation https://wpml.org/documentation/support/debugging-theme-compatibility/#issue-wp_queryargs-or-get_postsargs-doesnt-filter-out-correct-posts-ids-for-the-current-language

If you are not able to accomplish this, I would recommend you contact one of our certified partners that will be more than happy to help you with this. In this link, you will find a list of our certified partners: https://wpml.org/contractors/

Look forward to your reply.
Thanks

The topic ‘[Closed] Query posts return all language’ is closed to new replies.