• zbrass

    (@zbrass)


    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/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Chouby

    (@chouby)

    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

    (@zbrass)

    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/

    Hope you can help.

    Thanks!

    Plugin Author Chouby

    (@chouby)

    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.