Title: Query posts with WPML
Last modified: August 24, 2016

---

# Query posts with WPML

 *  Resolved [Dimitri Grassi](https://wordpress.org/support/users/wordpresschef/)
 * (@wordpresschef)
 * [11 years ago](https://wordpress.org/support/topic/query-posts-with-wpml/)
 * Hi,
 * I have a website translated with WPML, is it possible to query a custom post 
   type into a specific language?
 * Thank you
 * [https://wordpress.org/plugins/ajax-load-more/](https://wordpress.org/plugins/ajax-load-more/)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [11 years ago](https://wordpress.org/support/topic/query-posts-with-wpml/#post-6141306)
 * Ajax Load More checks for the current WPML language and then passes the language
   to the query.
 * Like so:
 *     ```
       $lang = defined('ICL_LANGUAGE_CODE') ? ICL_LANGUAGE_CODE : '';
       $args = array(
       'lang=> $lang,
       );
       ```
   
 * So this should work for you. Have you tested?
 *  Thread Starter [Dimitri Grassi](https://wordpress.org/support/users/wordpresschef/)
 * (@wordpresschef)
 * [11 years ago](https://wordpress.org/support/topic/query-posts-with-wpml/#post-6141315)
 * Hi,
 * thank you for the quick answer. Actually I’m using this shortcode for the both
   languages version:
 * `[ajax_load_more post_type="progetto" posts_per_page="10" max_pages="none" transition
   ="fade" button_label="more projects" scroll="true"]`
 * But in the translated version I don’t see the posts displayed.
 * What should I do.
 * Thank you.
 * Dimitri
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [11 years ago](https://wordpress.org/support/topic/query-posts-with-wpml/#post-6141430)
 * So you are only seeing the primary language? No translated posts at all?
 *  Thread Starter [Dimitri Grassi](https://wordpress.org/support/users/wordpresschef/)
 * (@wordpresschef)
 * [11 years ago](https://wordpress.org/support/topic/query-posts-with-wpml/#post-6141444)
 * Hi,
 * actually not.
 * This is the page with the original language:
    [http://fondazioneachillecastiglioni.it/progetto/](http://fondazioneachillecastiglioni.it/progetto/)
 * and this is in the translated language:
 * [http://fondazioneachillecastiglioni.it/en/projects/](http://fondazioneachillecastiglioni.it/en/projects/)
 * Thank you for help.
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [11 years ago](https://wordpress.org/support/topic/query-posts-with-wpml/#post-6141488)
 * Ok thanks – Im going to try to test this tomorrow.
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [11 years ago](https://wordpress.org/support/topic/query-posts-with-wpml/#post-6141501)
 * I just ran a test on a local site running WPML and it’s working as expected.
 * ALM is only pulling pages in the current language.
 * Looks like you are no longer using the plugin anyways, so I am closing this issue.
 *  Thread Starter [Dimitri Grassi](https://wordpress.org/support/users/wordpresschef/)
 * (@wordpresschef)
 * [11 years ago](https://wordpress.org/support/topic/query-posts-with-wpml/#post-6141502)
 * Hi,
 * actually I’m still using the plugin.. Di you tried that URL ?
 * D.
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [11 years ago](https://wordpress.org/support/topic/query-posts-with-wpml/#post-6141503)
 * Yea I did… Doesn’t look like ALM is on the page?
 *  Thread Starter [Dimitri Grassi](https://wordpress.org/support/users/wordpresschef/)
 * (@wordpresschef)
 * [11 years ago](https://wordpress.org/support/topic/query-posts-with-wpml/#post-6141504)
 * This the url of the page that use ALM
 * [http://fondazioneachillecastiglioni.it/progetto/](http://fondazioneachillecastiglioni.it/progetto/)
 * and this is the back-end of the page:
 * [https://www.dropbox.com/s/srs7v9o6jxvuz2d/Screenshot%202015-05-20%2015.33.06.png?dl=0](https://www.dropbox.com/s/srs7v9o6jxvuz2d/Screenshot%202015-05-20%2015.33.06.png?dl=0)
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [11 years ago](https://wordpress.org/support/topic/query-posts-with-wpml/#post-6141505)
 * Ajax Load More is not on that page.
    [http://fondazioneachillecastiglioni.it/progetto/](http://fondazioneachillecastiglioni.it/progetto/)

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Query posts with WPML’ is closed to new replies.

 * ![](https://ps.w.org/ajax-load-more/assets/icon-256x256.png?rev=2944639)
 * [Ajax Load More – Infinite Scroll, Load More, & Lazy Load](https://wordpress.org/plugins/ajax-load-more/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ajax-load-more/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ajax-load-more/)
 * [Active Topics](https://wordpress.org/support/plugin/ajax-load-more/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ajax-load-more/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ajax-load-more/reviews/)

## Tags

 * [translations](https://wordpress.org/support/topic-tag/translations/)

 * 10 replies
 * 2 participants
 * Last reply from: [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/query-posts-with-wpml/#post-6141505)
 * Status: resolved