• Resolved creatile

    (@creatile)


    How can I make the plugin work with polylang ?

    I have tried to modify the query in process.php in order to get the results in the current language.

    I have tried

    $query->set( 'language', 'english' );
    $query->set( 'lang', 'en-US' );

    But it still doesn’t work

    I have seen in the polylang documentation that I should modify the get_search_form function

    Do you have an idea ?

    Best regards

    http://wordpress.org/extend/plugins/wp-query-search-filter/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TC.K

    (@wp_dummy)

    I am not familiar with polylang plugin. But from the documentation i read, i think you should use the slug instead of the language Locale in the query, like this:
    $query->set( 'lang', 'en' );
    instead of
    $query->set( 'lang', 'en-US' );

    Hope this helps.

    Thread Starter creatile

    (@creatile)

    This solution is working for me

    $query->set( 'lang', 'en' );

    Thanks a lot

    Do you know how to manage it with WPML?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Make it work with polylang’ is closed to new replies.