Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Chouby

    (@chouby)

    Hi,

    As your search urls don’t match the standard WordPress search url, this needs PHP to be fixed. There is this filter: https://github.com/polylang/polylang/blob/2.3.10/frontend/frontend-links.php#L156-L164 to modify the translation url according to your needs. This could allow you to add the “type” query. However, I don’t recommend to add the page number as you could have a different number of results in different languages (if all your posts are not translated).

    Thread Starter misterbenj34

    (@misterbenj34)

    Hello Chouby,

    Thanks for your answer !
    I’m unfortunately as not good in PHP/WordPress coding as I look 🙂

    I can’t find where this filter “pll_translation_url” code is..

    I appreciate your help
    Thanks

    Thread Starter misterbenj34

    (@misterbenj34)

    I finally solve it by adding this line:

    $translation_url = $translation_url . “?” . $_SERVER[‘QUERY_STRING’];

    • This reply was modified 7 years, 8 months ago by misterbenj34.
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Keep search results when switching languages’ is closed to new replies.