WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Disable Polylang from copying custom fields. (3 posts)

  1. jmone
    Member
    Posted 1 year ago #

    Hi!

    I have a problem with polylang (newest version) and advanced custom field (3.5.8).

    When doing a translation, polylang populates the custom fields with data from the post being translated. I dont want this behavour, and I am wondering how to disable this? I already removed synching. But that just disable syncing of these fields. I want to disable copying of them.

    Ive been reading these forums, the plugin documentation but cant find any setting, hack or fix to help me turn of copying of these custom fields.

    Other than that, thanks for a great plugin! :)

  2. Chouby
    Member
    Posted 1 year ago #

    You can add this code in your functions.php or in a custom plugin.

    add_filter('pll_copy_post_metas', create_function('$keys', 'return array();'));
  3. jmone
    Member
    Posted 1 year ago #

    Thank you very much! That seems to be a working solution, tried on both local development server, and live server.

    Not everbody would like to have the custom fields copied over, so just a thought for a future version of the plugin, this could be an option?

    Anyways, thanks for the fast reply and help.

Topic Closed

This topic has been closed to new replies.

About this Topic