• Resolved polarracing

    (@polarracing)


    Hi,
    I’m using Polylang Pro and ACF:Extended Taxonomy Term Field.

    When translating a post the Taxonomy Term field does not sync – even its set to sync in the Polylang Pro option in the field settings.

    Also Taxonomy Terms selected in one language are not available in the the other language.

    Any trick I’m missing here??

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

    (@hwk-fr)

    Hello,

    Thanks for the feedback! ACF Extended use the native behavior used between ACF & Polylang, which basically means Polylang alter queries & ajax queries for ACF fields on-the-fly (depending on the selected language).

    This is why you won’t see terms that aren’t translated in a specific taxonomy with the Taxonomy Terms field. That’s how Polylang works. But maybe there’s something I didn’t understand there? Can you share a screenshot or a video showing the problem?

    Have a nice day!

    Regards.

    Thread Starter polarracing

    (@polarracing)

    Hi,

    thanks for the reply. I was assuming something like that.
    The funny think is, that Polylang Pro allows me to use untranslated taxonomies with the original ACF Taxonomy field.
    But this has also a flaw. It saves the values properly in the field and passes them to fields in translated post, but does not save them into the taxonomy for the translated posts. To achieve this you have to open and save the translated post manually.

    Currently I’m playing around with some code, that would allow to save those values into the taxonomy when saving the original post, but did not manage to get that working so far as wp_update_post alone is not doing the trick.

    // get translated posts -> English
    $translated_id = pll_get_post( $post_id, 'en' );
    
      if ( $translated_id && $translated_id !== $post_id) {
    
        // unhook this function so it doesn't loop infinitely
        remove_action( 'save_post', 'set_translated_categories' );
    
        // update the english post, which calls save_post again
        wp_update_post( array( 'ID' => $post_id ) );
      }

    This gets me the translated posts and updates them, but does not write the taxonomy field values to the taxonomy. I guess I have to have alter my code with the values from the fields or the taxonomies values from the original post.

    If that works, it would allow to use taxonomy fields for untranslated taxonomies (for i.e. brand names, etc.) properly with Polylang and ACF-taxonomy field.

    Maybe you have an idea – I would appreciate any hint.

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Sorry for the late answer. This look like the native Polylang behavior, and not a bug with ACF Extended. I don’t have much time for custom development right now, as I’m 100% focused on ACF Extended development. I wil ltry to take a look at it after the holidays.

    Have a nice day & merry christmas!

    Regards.

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

The topic ‘Taxonomy terms field + Polylang’ is closed to new replies.