Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing issues where posts created with the

wp_insert_post

function are not visible in the WordPress dashboard, although they exist in the

wp_posts

database table. This is due to missing relations in the

wp_icl_translations

table, which they have temporarily fixed using WPML's fixing functions.
Solution:
We recommend using WPML's filters and action hooks to ensure proper multilingual support when performing custom coding. Here are some resources that might help:

If custom work is needed beyond the provided documentation, we suggest contacting WPML Contractors at WPML Contractors.

If this solution doesn't look relevant, please open a new support ticket at WPML Support Forum.

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.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Waqas Bin Hasan 1 year, 10 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
September 12, 2023 at 9:24 am #14382045

piotrS-20

So, I have problem, because i try to create new post by func wp_insert_post and sometimes this post isn't visible in dashboard but there is in database wp_posts. So I found that in this case do not exists a relation in table wp_icl_translations. So I fixed it by your fixing functions in WPML panel.

This situation is irregular, so I want to to prevent this kind of situation in future. What do you suggest?

Thanks

September 13, 2023 at 9:50 am #14388841

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting the support.

Unfortunately support for custom coding is out of scope of this forum.

However, WPML offers filters and action hooks that can be used in your WordPress theme or plugin to provide correct multilingual support. Browse following resources for more information:

- https://wpml.org/documentation/support/wpml-coding-api/
- https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/
- https://wpml.org/documentation/support/wpml-coding-api/shortcodes/
- https://wpml.org/faq/how-to-get-current-language-with-wpml/
- https://wpml.org/documentation/support/wpml-tables/
- https://wpml.org/documentation/related-projects/woocommerce-multilingual/wcml-hooks-reference/
- https://wpml.org/documentation/support/

If you need additional custom work, we recommend you contact WPML Contractors at https://wpml.org/contractors/.

Regards.