Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Search form not valid

Home / Forums / Virtue Theme / Search form not valid

This topic is: Not Resolved
[Not Resolved]
Posted in: Virtue Theme
June 8, 2016 at 5:44 am

If you validate the search form you get this error:
The for attribute of the label element must refer to a non-hidden form control.
It refers to this line of searchform.php
<label class="hide" for="s"><?php _e('Search for:', 'virtue'); ?></label>
You have to change this
<input type="text" value="<?php if (is_search()) { echo get_search_query(); } ?>" name="s" class="search-query" placeholder="<?php echo $searchtext; ?>">
to
<input type="text" value="<?php if (is_search()) { echo get_search_query(); } ?>" id="s" name="s" class="search-query" placeholder="<?php echo $searchtext; ?>">
This was the very last error to make my page 100% valid against validator.w3.org

  • The forum ‘Virtue Theme’ is closed to new topics and replies.