Viewing 3 replies - 1 through 3 (of 3 total)
  • ACF has changed the way they get their posts in 5.2.X. It may be because of polylang/frontend/frontend-auto-translate.php; PLL_Frontend_Auto_Translate->pre_get_posts($query); Since the new method for ACF relies on pre_get_posts.

    I am ready to launch a multilingual site with PolyLang and ACF in two weeks. I would love to work towards a solution for this.

    BTW, @chouby, thank-you for a great product.

    Hi,

    I’m having similar problems, when editing a post in another language than whats active in the admin bar. ACF post objects, relationship, page link fields are empty (the values).

    I’m trying a workaround on a dev site, with a custom pre get post filter in functions.php:

    add_action( 'pre_get_posts', function( $query ) {
    
    	if ( is_admin() ) {
    		global $pagenow;
    
    		if ( ( 	'post.php' === $pagenow ||
    				'edit-tags.php' === $pagenow
    			)
    			&& isset( $query->query['post__in'] )
    			&& isset( $query->query['post_type'] ) ) {
    
    			// set empty lang
    			$query->set( 'lang', '' );
    		}
    	}
    
    	return $query;
    });

    But this doesn’t feel like a robust solution… I’m having the same problems with the post 2 post plugin for example.

    @chouby, maybe you could give som feedback on this subject?

    Edit: I’m using WP 4.2.2, Polylang 1.7.6, ACF 5.2.6

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘ACF relationship fields & Polylang’ is closed to new replies.