Support » Plugin: Redirection » Search doesn’t work when Redirection plugin is active

  • webby1973

    (@webby1973)


    Hello,

    I’m using this useful pluging to redirect the home page to a special post type created with a Themify theme, so I needed to add a redirection because AFAIK WordPress doesn’t allow the home page to be a post type (article).
    In the WordPress settings the home page is set to a specific page.

    I had to use the pass-through option like this:
    – redirection from that page to the post type url.
    Options:
    – start url: /
    – query parameters: ignore
    – match: URL only;
    – when matched: pass-through;
    – destination url: /folder/custom-post-type-url/
    – group: redirections

    The redirection works, but what is not working at all now is the search function of the website, whatever I look for I get an 404 error! If I deactivate the plugin the search does work.
    What can cause this odd result?

    Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author John Godley

    (@johnny5)

    Yes, you can’t do that passthrough on the home page and have search working. You’ll need to find another way of doing what you want.

    webby1973

    (@webby1973)

    @johnny5 Hello John, thank you for confirming the issue.
    Do you have any suggestion, or can you please explain to me the reason why this kind of redirection break the search function?

    Plugin Author John Godley

    (@johnny5)

    The passthrough feature is not intended to pass through functionality, only the page itself. You are trying to do something for which it is not designed, and so things will stop working. Sorry, the only suggestion I have is to try another way of achieving your aim.

    webby1973

    (@webby1973)

    @johnny5 OK, but why does it break the search on the whole website? The redirection is set for the home page only.

    Plugin Author John Godley

    (@johnny5)

    Ok, you didn’t mention whole website before. I imagine it’s because the search occurs from the home page, and you’ve changed that, so it doesn’t work.

    webby1973

    (@webby1973)

    @johnny5 The search doesn’t work anywhere on the website, I mean whatever page you’re searching from the result is a 404.

    Plugin Author John Godley

    (@johnny5)

    Sure, and the search function is sent to the home page, which you have modified. It doesn’t matter which page you start from. If it is causing a problem with the search then you should disable the passthrough.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.