I'm using wpml string translation on my main site, which pulls content from the other blogs, by doing a blog switch. This successfully gets english posts from the other sites if my main site is in english mode, and it gets danish posts from the other sites if my main site is in danish mode. However, the string translation does not happen, and "MORE INFO" appears regardless of the current language settings. I have done a dump of the constant ICL_LANGUAGE_CODE in the while loop and it is danish or english depending on which language my main site is currently in. So why does wpml not run string translation>

$blog_list = wp_get_sites( 0, 'all');

foreach ($blog_list as $blog)
    $the_query = new WP_Query( array(

        while ( $the_query->have_posts() ) 
<div class="more_info current_blog_bg_sixth">
    <a href="#">
      <span><?php _e('MORE INFO', 'my-domain') ?></span>

        } //close while

    } //close if
} //close foreach
  • Did you figure this out? – Talasan Nicholson Feb 4 '16 at 20:58
  • @TalasanNicholson I can't remember, it was a while ago. Sorry. I think it had to do with the string translations not being present on all the multi sites. I only had it on my main, and that is not enough. – Satbir Kira Feb 10 '16 at 14:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.