We're using the excellent polylang to translate our website content and themes , there are a range of options about which fields and settings are duplicated between paired pages.

We've selected to duplicate all custom fields, featured images etc, but clearly not the main page title, excerpt or content , as this is the real textual content that needs to be translated.

We have a lot of content to add, and most pages have a large gallery , which we're adding using the native WP [gallery] shortcode and the gallery builder , nothing special.

I imagined that the shortcodes in the post_content would be easy to simply copy and paste to the connected posts - however, while the [gallery] shortcode can be copied and appears correctly in the new post editor screen, it is not recognised , it appears as an empty gallery.

So, my next guess was that WP was adding a gallery post type or adding some post_meta when each gallery was saved , but I can't see anything being added to either table when a new gallery is created and saved.

So , my questions is where and how are galleries saved and connected to the post - and how can I hook it this action to also build a connection to another post, or to make the gallery more portable between posts?


I've checked the post_type attachment and post_meta added to each image uploaded , this only contains the path to the image and the information about the various image_sizes and additional exit data from the image...

closed as off-topic by kaiser Mar 27 '14 at 22:30

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • When you copy and paste the gallery code, what does it look like when you switch to Text view? is it just [gallery] or does it contain the list of media ids as well? – hereswhatidid Mar 27 '14 at 21:44
  • I copy and paste using the text view - it looks exactly the same as the original – Q Studio Mar 27 '14 at 21:54
  • @kaiser - WP plugins are both integral and vital to how WordPress works - in the future this will be increasingly true - is there a specific SO site just for WP plugins? - if not questions about usage of plugins should go here. – Q Studio Mar 28 '14 at 8:37
  • The plugins support forum would be best. – kaiser Mar 28 '14 at 8:44
  • I don't get it - is there a WP plugins site? if not - do you still object to this question? - it matters little, as I found the answer by having a place to openly discuss the options... – Q Studio Mar 28 '14 at 19:41

This answer and question turns out to be polylang specific - the answer is a settings in the plugin:

Settings > Languages > Settings

enter image description here

Unchecking this option stops polylang looking for a translation specific version of the embedded media - in this case the [gallery]

Not the answer you're looking for? Browse other questions tagged or ask your own question.