WPML and language condition | WordPress.org

[ad_1]

Hello @kreattivo

Thank you very much for using our plugin. In this case, you can read the posts associated to a language directly from the database with a query similar to:

SELECT * FROM {wpdb.posts} as posts
INNER JOIN {wpdb.prefix}icl_translations post_trans
ON posts.ID = post_trans.element_id
WHERE post_trans.language_code="The language code here";

Learn more about the WPML database structure by visiting the following link:

https://wpml.org/documentation/support/wpml-tables/

If you have other questions about the WPML database structure, you can contact the WPML developers team.

Best regards.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer