As standard the wordpress sidebar widget does NOT validate as HTML – this is because WordPress gives it a role for Accessibilty!
However if you have a client that demands HTML Validity – or you just prefer it then you can very simply edit the Core WordPress Files – However this will be changed on a wordpress update.
So we make our functions.php to re-write the role="search" out of the.
So what we do is we include a function to your themes functions.php
// Makes the WordPress Sidebar Search HTML Valid
function valid_search_form ($form) {
return str_replace('role="search" ', '', $form);
}
add_filter('get_search_form', 'valid_search_form');
That’s it!
Related Posts :
- OpenCart 301 Redirect Not Working SEO Fix ?_route_=
- WordPress: The plugin generated x characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin. *Fix*
- SEO Mansfield / Search Engine Optimisation Mansfield





No comments yet.