Quantcast
Channel: polylang – WordPress.org Forums
Viewing all articles
Browse latest Browse all 11471

Chouby on "[Plugin: Polylang] pll_copy_post_metas and custom post types"

$
0
0

What an old topic you found here! Things have changed quite a lot during the past year. Now it is no more useful to code to get your custom fields copied since Polylang does this by default for all public custom fields. There are even synchronized between translations if you keep the relevant option checked in Polylang settings.

Well... That said, there is an incompatibility between Types and Polylang because Types loads the custom fields values much before Polylang does for the standard WordPress custom fields. As you observed, these one correctly filled.

So I went diving into Types code and found that there are using an undocumented function of WPML to get the custom fields correctly copied when Types is used together with WPML.

I made an attempt to emulate this WPML functionnality. You can try with the new development version (1.1.1.2)
http://downloads.wordpress.org/plugin/polylang.zip

Let me know if it's OK for you.

NB: It seems that Types "locks" the custom fields values copied by WPML. It is what I noticed during my tests when I created a new translation (can't change this). However, the values are unlocked once the translated post is saved and reopened.

I believe that WPML would keep them locked but Polylang doesn't. The reason for this is that, as far as I know from my old tests with the latest freely downloadable version of WPML, you are obliged to have all posts in the default language. This is a limitation that Polylang doesn't have.


Viewing all articles
Browse latest Browse all 11471

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>