• Resolved AlexJS

    (@alexjs)


    Hi,

    I do rewrite my search URL like so

    if ( is_search() && !empty($_GET['s'])) {
          wp_redirect(home_url("/find/") . urlencode(get_query_var('s')));
          exit();
        }

    and I just figured that the WP SEARCH is not working anymore. It brings up the next best available page or post ULR or the 404 page. Honestly I am not sure if polylang is causing the trouble, so this is just me asking if it could be since it is the one plugin that touches URLs.

    Oh and when I remove the URL rewriting the search works fine again.

    I run many more website with my exact same theme but no polylang plugin and there the search works perfectly fine.

    Anybody an idea or even a fix?

    Thanks a lot for your support.
    Cheers, Alex

    PS
    – when I ‘deactivate’ all plugins the search is still broken with the rewrite and works without the rewrite.
    – also copied the rewrite code and the search.php template code from a site where it works fine to see if my code causes the trouble but the search was still broken

    http://wordpress.org/plugins/polylang/

Viewing 1 replies (of 1 total)
  • Thread Starter AlexJS

    (@alexjs)

    Okay, I clicked around in the polylang settings and now its working.

    I have not really changed the URL settings as it was already set to ‘not change the URL’ where possible. But it said that some posts had no language setting.

    After I save the settings the search works like a charm again with the URL rewrite.

    Thanks but no thanks 😉

Viewing 1 replies (of 1 total)

The topic ‘Issue with search URL rewrite’ is closed to new replies.