Title: Custom Post Type
Last modified: August 21, 2016

---

# Custom Post Type

 *  [zbrass](https://wordpress.org/support/users/zbrass/)
 * (@zbrass)
 * [13 years ago](https://wordpress.org/support/topic/custom-post-type-32/)
 * Hi
    I use this filter;
 *     ```
       add_filter('pll_copy_post_metas', 'copy_post_metas');
       	function copy_post_metas($metas) {
            return array_merge($metas, array('address','pool_box_check','location','persons','rooms','bathrooms','airport','airport-km','train-km','train','calendar','_secondary_html_128','reference','price'));
            }
       ```
   
 * But now all my post metas seem to copy when i start a new languige page
    What
   happened?
 * Regards
 * Arthur
 * [http://wordpress.org/extend/plugins/polylang/](http://wordpress.org/extend/plugins/polylang/)

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

 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [13 years ago](https://wordpress.org/support/topic/custom-post-type-32/#post-3690373)
 * You should explain what you want to reach. Because, it seems that what you obtain
   is what you ask the code to do.
 *  Thread Starter [zbrass](https://wordpress.org/support/users/zbrass/)
 * (@zbrass)
 * [13 years ago](https://wordpress.org/support/topic/custom-post-type-32/#post-3690397)
 * Hi Chouby,
    No the problem is that all my fields copy the text of the motherpage
   into the second language page. So not only the ones i filter in the functions.
   php. The results in the site are now also completely messed up. 🙁 French Dutch
   and English is messing up in random way. very strange. Here an example [http://piscines-vacances-provence.com/house/mas-des-roses-nl/](http://piscines-vacances-provence.com/house/mas-des-roses-nl/)
 * Hope you can help.
 * Thanks!
 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [13 years ago](https://wordpress.org/support/topic/custom-post-type-32/#post-3690398)
 * By default, $metas will contain all non hidden fields (+ the featured image and
   the page template). If you want only the custom fields in your array, then you
   should not merge them to $metas.
 *     ```
       add_filter('pll_copy_post_metas', 'copy_post_metas');
       function copy_post_metas($metas) {
       	return array('address','pool_box_check','location','persons','rooms','bathrooms','airport','airport-km','train-km','train','calendar','_secondary_html_128','reference','price');
       }
       ```
   

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

The topic ‘Custom Post Type’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [Chouby](https://wordpress.org/support/users/chouby/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/custom-post-type-32/#post-3690398)
 * Status: not resolved