Title: WPML export
Last modified: February 17, 2021

---

# WPML export

 *  Resolved [wpwebhr](https://wordpress.org/support/users/wpwebhr/)
 * (@wpwebhr)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/wpml-export/)
 * Hello,
 * I’m working on a real estate site. I need to export a custom post type as a custom
   XML feed. Is it possible to pull all the data from english version and only titles
   and descriptions in another two languages?
    This is what I need:
 * <property>
    <property-id>ID<property-id> <property-title>TITLE</property-title
   > <property-desc>DESCRIPTION</property-desc> <property-size>SIZE</property-size
   > . . . (all the other data) <property-title-DE>TITLE DE</property-title-DE> 
   <property-title-IT>TITLE IT</property-title-IT> </property>
 * There is a WPML language selector which allows you to choose one language or 
   all of them, but that doesn’t solve my problem. Would it be doable with WP_Query?

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

 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/wpml-export/#post-14091471)
 * Hi [@wpwebhr](https://wordpress.org/support/users/wpwebhr/),
 * > Is it possible to pull all the data from english version and only titles and
   > descriptions in another two languages?
 * Yes, but you’d have to write a custom PHP function to get the data from the other
   languages: [https://www.wpallimport.com/documentation/export/pass-data-through-php-functions/](https://www.wpallimport.com/documentation/export/pass-data-through-php-functions/).
 * Here’s a basic example function that you can modify as needed:
 *     ```
       function my_get_description( $language, $idpost ) {
           $postid = apply_filters( 'wpml_object_id', $idpost, 'post', FALSE, $language );
           $post = get_post( $postid );
           if ( !empty( $post ) ) {
               return $post->post_content;
           }
       }
       ```
   
 * Example usage:
 * `<spanishdescrip>[my_get_description("es",{ID})]</spanishdescrip>`
 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/wpml-export/#post-14225051)
 * Hi [@wpwebhr](https://wordpress.org/support/users/wpwebhr/),
 * I’m marking this as resolved since it’s been inactive for a while. Please open
   a new topic if you still have questions.
    -  This reply was modified 5 years, 2 months ago by [WP All Import](https://wordpress.org/support/users/wpallimport/).

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

The topic ‘WPML export’ is closed to new replies.

 * ![](https://ps.w.org/wp-all-export/assets/icon-256x256.png?rev=2570162)
 * [WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel](https://wordpress.org/plugins/wp-all-export/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-all-export/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-all-export/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-all-export/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-all-export/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-all-export/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/wpml-export/#post-14225051)
 * Status: resolved