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?
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
So you are only seeing the primary language? No translated posts at all?
Hi,
actually not.
This is the page with the original language:
http://fondazioneachillecastiglioni.it/progetto/
and this is in the translated language:
http://fondazioneachillecastiglioni.it/en/projects/
Thank you for help.
Ok thanks – Im going to try to test this tomorrow.
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.
Hi,
actually I’m still using the plugin.. Di you tried that URL ?
D.
Yea I did… Doesn’t look like ALM is on the page?