Support

Account

Home Forums General Issues Relationship field and Polylang

Solving

Relationship field and Polylang

  • Hi,

    Im using a relationship field filtering several custom post types together with Polylang.

    If a translation of the post exists it is listed Ok when querying the relationship field in the admin, but I would like to query from all languages.

    I’m aware of the acf/fields/relationship/query filter but I haven’t succeed to achieve what I want.

    Any tips, hints?

    Thanks

  • Did you ever solve this?

  • @nikoleg, yes, here’s a piece of code which deactivate the language filter on ACF relationship field:

    add_action('wp_ajax_acf/fields/relationship/query', function () {
        if (function_exists('PLL')) {
            remove_action('parse_query', array(PLL()->filters_post, 'parse_query'));
        }
    });
Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Relationship field and Polylang’ is closed to new replies.