Loads wrong language.. sometimes?
-
Okay so this is odd, I’m using Ajax Load More in conjunction with WPML.
In my page template I have set the following code:
`<?php if ( ICL_LANGUAGE_CODE==’en’ ) : ?>
<?php echo do_shortcode(‘[ajax_load_more container_type=”ul” post_type=”post” custom_args=”lang:en” category=”teen-health” posts_per_page=”4″ repeater=”template_1″ scroll=”true” scroll_distance=”160″ transition=”fade” orderby=”date” order=”DSC”]’); ?>
<?php elseif ( ICL_LANGUAGE_CODE==’fr’ ) : ?>
<?php echo do_shortcode(‘[ajax_load_more container_type=”ul” post_type=”post” custom_args=”lang:fr” category=”sante-des-ados” posts_per_page=”4″ repeater=”template_1″ scroll=”true” scroll_distance=”160″ transition=”fade” orderby=”date” order=”DSC”]’); ?>
<?php endif; ?>`This works, but I’m getting a bug where sometimes the wrong language is displayed when using the language switcher, it seemingly doesn’t happen when I just refresh the current page. It doesn’t always happen, and seems to happen more when viewing in a private browser. There is no caching plugins installed and no server level caching as well, I also installed rebusted but that doesn’t help.
The page I need help with: [log in to see the link]
The topic ‘Loads wrong language.. sometimes?’ is closed to new replies.