Forums

[resolved] Search and W3C, now search is not working (2 posts)

  1. moffen
    Member
    Posted 1 year ago #

    I have tried to install a W3C validated theme on my site. When I validated, there was a complaining about a role attribute in the search form. I found this fix on a website, which I've added to the functions.php in my theme:
    ___
    function valid_search_form ($form) {
    return str_replace('role="search" ', '', $form);
    }
    add_filter('get_search_form', 'valid_search_form');
    ___

    Know my site is validated, but when I search on my site, nothing happen, it just on the frontpage, but not with any results. Any solutions?

  2. moffen
    Member
    Posted 1 year ago #

    I found a solution, the W3 Total Cache broke the search function. How to fix that?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.