Support

Account

Home Forums ACF PRO [Polylang incompatibility] Related posts are not showing up

Unread

[Polylang incompatibility] Related posts are not showing up

  • I want to link my blog posts to pages. Pages are translated with Polylang, Blog posts are not.

    I’ve disabled translations for regular posts using a hook:

    
    add_filter('pll_get_post_types', function ($postTypes) {
        return array_filter($postTypes, function ($postType) {
            return $postType !== 'post';
        });
    });
    

    Since I did that, newly added blog posts are not displayed on the relationship dropdown. I can only see old posts there (the posts that were added before I added this hook).

    So I suppose that ACF adds some language attribute to queries that prevent posts without some Polylang-specific meta field from being queried.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.