Support

Account

Home Forums Bug Reports ACF uses wrong language while creating a term when Polylang is enabled

Solving

ACF uses wrong language while creating a term when Polylang is enabled

  • Hi! I’ve found a bug in ACF Pro in combination with using Polylang. Don’t know if you want to support Polylang, but is seems like an easy fix.

    When creating a new term using the Taxonomy field type (with the ‘+’ button), ACF will use the default site language to create the term, and not the language from the current post you are editing.

    If you save the post after creating the term, the created term will not be visible in the Taxonomy field, unless I change its language manually to the language the post is in.

  • ACF does not directly support Polylang and this would require altering the popup used by acf to allow selecting a language.

    I don’t know of any way to accomplish what would need to be done, at least not directly.

    I don’t have any specifics but I would look into the following. Create and acf/save_post action. In this action get the language set for the post and get the selected terms. Check each of the selected terms to make sure they are for the language selected on the page. If the language is incorrect then update the term to the correct language.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.