Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #601815

    Hi, I use Polylang in enfold and I have a little problem in Ajax search,.

    for example, when I typing some Word I see results:

    Portfolio Ítems
    -Portfolio 1
    -Portfolio 2
    View all results

    The problem is in (View all results link), for main language I don’t have any problem, (/?s=xxx), but for other languages don’t apply the language link (/es/?s=xxx)

    Thanks in advance


    Hey Gabri,

    Could you provide us with a link to the site in question so that we can take a closer look please?



    Hi, I answer below…



    Thank you for the info. You can try the solution provided here:

    For further support regarding the plugin, please contact the polylang team.



    Hi Ismael, thanks for your answer.

    Before open this topic I take a few minutes to find an answer in forums/documentation, I find the answer you comment in enfold documentation referring to this post ( and it solved a part of the problem, the function is to filtering results in current language and it works properly.

    My problem, or problem with all people who use polylang is that (View all results link) don’t work properly, do a test in my website. (links in private)
    I found 2 options to solve this:

    1) Hidden “view all results link” with css. I’m not happy with this option
    2) Editing “functions-enfold.php” line:137
    According to polylang documentation, the code to refer a “home_url()” in current language is “pll_home_url()”.
    For now I edit functions-enfold.php:137
    //’all_results_link’ => home_url(‘?’ . http_build_query($_REQUEST)),
    ‘all_results_link’ => pll_home_url().’?’.http_build_query($_REQUEST),
    And now, (View all results link) works fine! I don’t know if there are another solution to fix it.
    The strangest thing is that the magnifying glass always it works with current language, and really do the same result that (View all results). I don’t know why enfold team generate a different link for (view all results) and not the same..?
    Please, can anyone help me to create a function to fix the problem with (View all results) link and not have to update every time the file functions-enfold.php:137..?

    Thanks in advance



    it would require a huge amount of time and customization of the theme and that is why you would need to hire a freelance developer for this job.

    We recommend to use WPML instead, as it is fully compatible with Enfold.

    Best regards,


    Hey Andy, the problem is not the time, I search now how to add_filter in wordpress, I read ( and create a new function to include and solve the problem:

    function avf_modify_ajax_search_messages($search_messages)
    	    $search_messages[all_results_link] = pll_home_url().'?'.http_build_query($_REQUEST);
        return $search_messages;
    add_filter('avf_ajax_search_messages', 'avf_modify_ajax_search_messages', 10, 1);

    Please, check the code and include the code in (( to help others.




    Thank you for taking the time to solve the remaining issue. The filters in theme are added in cases like this. We will include this snippet in the documentation. :)


Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.