Support » Fixing WordPress » Blank search redirects to post page

  • I’ve created a PHP snippet to load a search form into the header of all site pages. If I hit the search button without having anything typed in it redirects to the page listing posts. I’ve got my site set up as pages with a news page showing category posts (all posts are the same category). This problem happens with Responsive and Thematic themes,maybe others. Here’s the PHP snippet placed in the functions.php file of my child theme for Responsive

    // add search form to the header - inside the branding div
    function childtheme_searchform(){

    I’ve got this site running local. For working example go to and use their search on the home page

  • The topic ‘Blank search redirects to post page’ is closed to new replies.