• Hi,

    We’re using Gutentor for posts feeds with filtering. The following bug occurs:

    We have translated Finnish posts in English (with Polylang). We would like to show only Finnish posts on Finnish pages and English posts on English pages so we have updated the post feeds to only include categories in the right language. That is working well and also by default the page shows only posts in the right language. However, if a user clicks on the filter “all” it will show ALL the published posts – also the ones that are not in the added categories, so also Finnish posts on English pages and vice versa.

    Looking forward to a solution on this. Thanks!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor codersantosh

    (@codersantosh)

    Hi @siniak ,
    I’m not an expert on Polylang, but based on this WordPress forum thread and the Polylang documentation, it appears that the lang parameter is missing in the Gutentor query in the gutentor_get_query function. You can see the relevant code here.

    Could you try adding the following code at the end of the function gutentor_get_query?

    if (function_exists('pll_current_language')) {
    $query_args['lang'] = pll_current_language('slug');
    }

    Please let me know if this works for you. If it does, I will include it in the next version of the plugin.

    Best Regards!

    verkkovaraani

    (@verkkovaraani)

    Hi

    No, it does not seem to resolve it. Is that function loaded when the filters are clicked (ajax). When we first load the page, the correct pages are shown. If we use the filters shown on top of the element, and click “All”, it does not work but shows all posts including en and fi. For the other filters we can easily make it work, because there is a setting to show only certain categories, and in english page we can include only english categories and in finnish page only finnish categories.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.