Search code examples
wordpressnextgen-gallery

Can't get NextGen gallery in translated post


I'm creating a custom WordPress theme. So far, it was only in one language, and getting galleries in the code was working fine. That's the code I've been using:

// Sometimes this    
echo nggShowGallery( $id ); 

// Sometimes this, as well
echo do_shortcode("[nggallery id='{$id}']");

Now, when creating a second language, using Polylang, this code will only get the gallery for the original page or any other page in the former language, but it won't work for any page in any other language. Also, the page stays absolutely blank even though I've set WP_DEBUG to true.

Googling this issue I've found that there seems to be a lot of trouble using NextGen in multilingual sites.

Any clue?


Solution

  • Well, I finally managed the site to work by making a new WordPress install and using WPML as the plugin for translations. Everything's working fine now. So I guess there was some kind of incompatibility between Polylang and NextGen. Not even installing WPML on the first site solved the issue; I had to begin from scratch.

    In case this is useful to someone, I was using NextGen 2.0.65 with Polylang 1.3.1. This didn't work.

    Now I'm using NextGen 2.0.66 and WPML 3.1.5. Works fine.