Support » Plugin: Polylang » Issues with Ultimate WP Query Search Filter

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Troglos

    (@troglos)

    Nobody is using Polylang with Ultimate WP Query Search Filter?

    I’ve managed to add a hidden lang value with

    add_action('uwpqsf_form_mid', 'my_search_form');
    function my_search_form($html) {
     $html = '<input type="hidden" name="lang" value="'. pll_current_language().'"/>';
     echo $html;
    }

    but I need it here mywebsite.it/en?unonce=0266f30700&uformid=126…..
    not appended at the end of the url

    suggestions?

    Plugin Support Chrystl

    (@chrystl)

    Hi
    Did you try:

    <input type="hidden" name="lang" value="<?php echo pll_current_language(); ?>"/>

    Thread Starter Troglos

    (@troglos)

    hi Chrystl,

    that’s exactly what I posted before.
    but that appends the lang at the end of the url, instead of adding it like this:
    mywebsite.it/en?unonce=0266f30700&uformid=126…..

    Plugin Support Chrystl

    (@chrystl)

    It should work but it is not a clean solution since it hacks the plugin code. In the /ultimate-wp-query-search-filter/html/searchform.php at line 118, replace

    echo $html;

    by

    echo apply_filters('get_search_form', $html);
    Thread Starter Troglos

    (@troglos)

    Great it works.
    Thank you.

    I wonder if there is a way to put it in functions.php

    Plugin Support Chrystl

    (@chrystl)

    Unfortunately no way to integrate this in the functions.php.

    You can ask to the Ultimate WP Query Search Filter author if he can integrate it in its plugin.

    Edit: Could you please mark your topic as “resolved”?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Issues with Ultimate WP Query Search Filter’ is closed to new replies.