Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #351935

    when using the search box i would like to show only results from the current language. at the moment it shows all. how can i limit it to the current language?

    thanks
    mathias

    #352348

    Hi MathiasVie!

    Thank you for using Enfold.

    Entries from other languages should be excluded by default when using the search function. Please post the website url here. We would like to check it. Make sure that you’re running Enfold 3.0.2 and the latest version of WPML.

    Cheers!
    Ismael

    #352693
    This reply has been marked as private.
    #352938

    Hey!

    I see. I’m sorry but we don’t provide support for third party plugins and honestly, I haven’t tried polylang yet. You can find the ajax search function on function-enfold.php file. I’ll ask Kriesi to take a look.

    Regards,
    Ismael

    #352949
    This reply has been marked as private.
    #353605

    Hi!

    Kriesi is a little bit busy right now so it might take a while before he can respond to this inquiry. I’ll close it for now but it will be re-opened when Kriesi respond. For faster results, please contact the plugin author or hire a freelance developer to investigate the issue further.

    Regards,
    Ismael

    #363361

    Hey!

    Please try to add this code in the functions.php:

    /**
     * Ajax Search Query
     */
     
    add_filter('avf_ajax_search_query', 'avf_modify_ajax_search_query', 10, 1);
    function avf_modify_ajax_search_query($search_parameters)
    {
       $language = pll_current_language();
       parse_str($search_parameters, $params);
       $params['lang'] = $language;
       $search_parameters = http_build_query($params);
       return $search_parameters;
    }

    Cheers!
    Ismael

    #368681

    Hm. Kenn das plugin leider auch nicht. würde mal bei den polylang leuten nachfragen ob es irgendeinen parameter gibt den man beim query mitschicken kann um die sprache zu filtern. Dann kan man das vielleicht in einen filter packen und mitschicken :)

    #369134
    This reply has been marked as private.
    #369252

    Hi!

    Glad it worked. :)

    Regards,
    Ismael

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘all languages in search result’ is closed to new replies.