Title: PolyLang and get_posts()
Last modified: August 31, 2016

---

# PolyLang and get_posts()

 *  [DCuserName](https://wordpress.org/support/users/dcusername/)
 * (@dcusername)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/polylang-and-get_posts/)
 * Hello,
 * New to the plugin, I haven’t found a solution to this in the documentation so
   far but appologies if it’s something obvious that I’m missing.
 * I have a lot of instances of generating content via get_posts() for custom post
   types, then looping through to generate content on page templates etc. It looks
   like PolyLang only retrieves posts that have been translated already within the
   current language. I’m wondering if there is any way to retrieve all posts in 
   the default language instead, unless there is a translation? It would be nice
   to not leave holes in the content while a client finishes translating, or if 
   they only intend to translate some pieces.
 * Or as an alternative, has anyone come up with a “copy all” kind of add-on for
   PolyLang, basically to click a button in the admin and loop through ALL pages,
   posts, custom posts, etc. and add exact copies to a new language? Then content
   could be hand translated later without worrying about missing pieces.
 * Thanks!
    David
 * [https://wordpress.org/plugins/polylang/](https://wordpress.org/plugins/polylang/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/polylang-and-get_posts/#post-7349719)
 * Hi!
 * Queries with get_posts() are explained here: [https://polylang.pro/doc/developpers-how-to/](https://polylang.pro/doc/developpers-how-to/)
 *  Thread Starter [DCuserName](https://wordpress.org/support/users/dcusername/)
 * (@dcusername)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/polylang-and-get_posts/#post-7349782)
 * Ah! Thanks so much, sorry I missed that. So maybe what I need to do then is write
   a function that abstracts that a bit, either retrieving posts from the default
   language first, and splicing in any translations in the current language. That
   could have a high overhead for performance I guess, but useful in some situations.
 * I’d still love to hear if anyone has implemented a kind of “clone all to new 
   language” system, copying all content, custom fields, attachments, etc., from
   the primary language to another. I suppose ideally things should just be carefully
   translated a piece at a time, and permalink slugs would be better kept in the
   new language than copied from the old.
 * Thanks again for a great plugin by the way, so much more stable and usable than
   others I’ve tried!
    David

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PolyLang and get_posts()’ is closed to new replies.

 * ![](https://ps.w.org/polylang/assets/icon-256x256.png?rev=3433336)
 * [Polylang](https://wordpress.org/plugins/polylang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/polylang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/polylang/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [DCuserName](https://wordpress.org/support/users/dcusername/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/polylang-and-get_posts/#post-7349782)
 * Status: not resolved