Search form not working with custom permalink structure


I am currently working on a dev site where I created a custom theme using roots. I noticed that when I have the permalink set to default the search functionality works, and when I change it to custom (/%postname%/) the search form redirects to the homepage. Can you please guide me to a solution.


Any error log messages?

No I dont see any error :frowning:

BTW the dev site is in a sub directory

I have found the solution. In wp-includes/general-template.php, on line 172 I had to change the action to “/index.php” from ’ . esc_url( home_url( ‘/’ ) ) . '.