wordpress snippets last updated   : July 14, 2014
we now have 634 snippets

Remove role=”search” in get_search_form()

wordpress snippet

Adding this PHP snippet to the functions.php of your wordpress theme will remove the role=”search” from the get_search_form() HTML output. Please note that role is an attribute introduced in XHTML draft for accessibility however does not validate.

snippet :  PHPcopy
function valid_search_form ($form) {
    return str_replace('role="search" ', '', $form);
}
add_filter('get_search_form', 'valid_search_form');

jqsnipp.com | we just launched jquery snippets website