Skip Navigation

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.

This topic contains 12 replies, has 2 voices.

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

Assisted by: Long Nguyen.

Author Posts
November 22, 2022 at 7:38 am #12508769

Mayubonne

Tell us what you are trying to do?

There is an another issue that I've been working for is the custom post list (news) page in my theme doesn't work properly. The list is not showed in each languages but showed in all languages mixed up.

My site:
hidden link, hidden link, hidden link

I attached the image of the list.

Please help me out on this issue.
Thank you very much in advance.

Mayubonne as Mayumi Tachikawa

news list_mbonmbonne.jpg
November 23, 2022 at 11:12 am #12518621

Long Nguyen
Supporter

Languages: English (English )

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

Hi there,

Thank you for contacting WPML support, I’d be happy to help you on this issue.

Can you please let me know how you add the list to the page and where I can find it on your site?
Then I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated.

❌ IMPORTANT: Please backup your database and website before providing us access ❌
You can use this plugin to do this: https://wordpress.org/plugins/duplicator/
It’s done in just a few minutes.

If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:

hidden link

Look forward to your reply.

Thanks

November 24, 2022 at 2:09 pm #12527855

Mayubonne

Hello Long,

Thank you very much for your returning.

Actually I would like you to check out my site but I have another issue to solve by accessing (wp-admin and FTP) by other supporter at the moment. Please wait for a while.

Best regards,
Mayumi

November 25, 2022 at 10:44 am #12533375

Long Nguyen
Supporter

Languages: English (English )

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

Hi,

I’m waiting for your feedback.

Thanks.

December 1, 2022 at 3:27 pm #12571847

Mayubonne

Hello Long,

I would like to ask the issue above to solve in a private way in order to access (wp-admin and FTP) temporally.

I upload images of the list page on my website and the custom page in the admin page.

For the list page on my site, please click to check "お知らせ (Japanese), "News (English)" or "Actualités (French)" in menu on the top.

Best regards,
Mayumi

news list_mbonmbonne.jpg
news list_mbonmbonne_EN.jpg
news list_mbonmbonne_EN.jpg
news list_mbonmbonne_FR.jpg
December 2, 2022 at 1:09 am #12575015

Long Nguyen
Supporter

Languages: English (English )

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

Hi,

Thank you for the feedback.

Can you please enable the minimal environment as below to see if it helps?
- Deactivate all non-WPML plugins
- Switch to a standard theme of WordPress (2022)
- You can try to create a new page with the block Post List of WordPress and see how it works

If there is a conflicting plugin with WPML, or the post list/block of code that does not work with WPML, please let me know.

Look forward to your reply.

Thanks

December 2, 2022 at 2:09 pm #12579065

Mayubonne

Hi Long,

Thank you for your replying.

It seems that there is nothing to conflict with WPML .
The thing is the news page in my using theme is build as custom pages as is probably custom_post_type.php.

The file is found in my theme - dp-lemon-cream → inc → scr → custom_post_type.php.

It will be grateful if you could check out the file and other files related with the issue in my using theme.

Best regards,
Mayumi

December 5, 2022 at 2:02 am #12587577

Long Nguyen
Supporter

Languages: English (English )

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

Hi,

Thank you for the feedback.

That section looks like a relation posts section. If you are using a custom function to get the related posts by using the WordPress function like get_posts() or WP_Query(), please add "suppress_filters=0" to the arguments.
Please read more on 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 it does not help, I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated. Your next reply is set to private to share the info.

❌ IMPORTANT: Please backup your database and website before proceeding ❌
You can use this plugin to do this: 
https://wordpress.org/plugins/duplicator/

Look forward to your reply.

Thanks

December 6, 2022 at 2:36 am #12595415

Long Nguyen
Supporter

Languages: English (English )

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

Hi,

Thank you for the feedback.

You can try to add the parameter suppress_fiters to the function get_posts() on line 75, for example:

$latest =  get_posts('numberposts='.$options['number_related_posts'].'&post_type='.$post_type.'&exclude='.$post->ID.'&suppress_filters=0');

Then delete all caches (transient of the related posts) to see how it works. You can use the following plugin to delete the transient or contact your developer to ask to delete it.
https://wordpress.org/plugins/transients-manager/

Look forward to your reply.

Thanks

December 7, 2022 at 11:41 am #12606283

Mayubonne

Hi Long,

Thank you so much for your help.

It's finally solved the issue on the first page list by adding the parameter you told me,
but it isn't solved yet on the next page list as the rest of Japanese lists which are not translated are showed up even though it is switched to other languages (each pages of English and French ).

Would you check out the issued page and tell me how to revise?
You'll see the page to click "More (English)", "Plus (French)", and "さらに表示 (original language, Japanese)" on the bottom of the list of first page.

I've attached the related image.

Best regards,
Mayumi

related_post 1.jpg
related_post 2.jpg
December 8, 2022 at 10:24 am #12613951

Long Nguyen
Supporter

Languages: English (English )

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

Hi,

Thank you for the feedback.

Those posts (Japanese) display on the English page because those posts are not translated into the English language, and the post type "oshirase" is set to "Use translatable - translations or return to default page when available" in WPML > Settings > Post Types translation.

If I set the post type to "Translatable - Show only translated items", the posts in the Japanese language will not display. Can you please confirm it works?

Look forward to your reply.

Thanks

December 9, 2022 at 5:02 am #12618917

Mayubonne

Hi Long,

Thank you very very much for your help. Finally Is’s resolved!!!

I think I need to revise when the theme update again but it will be OK as I do the same thing again .what you told me.

Thank you again,
Mayumi

December 12, 2022 at 12:51 am #12630575

Long Nguyen
Supporter

Languages: English (English )

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

Hi,

Thanks for your feedback. You may consider this thread resolved and can always open a new ticket whenever needed.

Regards.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.