A common problem with wordpress blogs or sites is that while validating the site we get validation error for the search form used in the site.
The error is for <form role=”search” method=”get” id=”searchform” action=”http://xadd..>..</form> where the validator does not validates role=”search”.
The step by step method to fix this issue is mentioned below:
- Login to your site through any ftp client where the wordpress site is installed.
- Search for the general-template.php file. It will be in the folder wp-includes.
- Open the file and search for the code $form = ‘<form role=”search” method=”get” id=”searchform” action=”‘ . home_url( ‘/’ ) . ‘” >
- Remove role=”search”, save the file and upload the file.
The search box will still work fine without any error. The positive thing is that you will not get any validation error due to your search form.