Please try asking for assistance in the plugin’s dedicated forum:
https://ww.wp.xz.cn/support/plugin/w3-total-cache
Never received a reply, if anybody knows how to fix this I’d appreciate it. My site won’t be W3C compliant until then.
Still haven’t found a way to fix this issue. Can somebody PLEASE at least point me in the right direction? I don’t know what I’m supposed to do. Site is not w3c compliant.
You could try this:
If there’s a searchform.php inside your theme folder, WordPress uses this file instead of the WP search form.
1. Check if there’s a searchform.php inside your theme folder
2. If not, create a file named searchform.php inside your theme folder
3. Now you can customize your search form as you like. And you can give the form an unique ID using something like id=”<?php echo uniqid() ;?>”
4. If there’s already a searchform.php inside your theme folder, you can add this to the <form> tag as well.
5. Get yourself a cup of coffee and enjoy W3C checker turning green 🙂
The searchform.php could look like this:
<form role="search" method="get" class="searchform group" id="<?php echo uniqid() ;?>" action="<?php echo home_url( '/' ); ?>">
<label>
<span class="offscreen"><?php echo _x( 'Suche nach:', 'label' ) ?></span>
<input type="search" class="search-field"
placeholder="<?php echo esc_attr_x( 'Suchbegriff', 'placeholder' ) ?>"
value="<?php echo get_search_query() ?>" name="s"
title="<?php echo esc_attr_x( 'Suche nach: ', 'label' ) ?>" />
</label>
<input type="image" alt="Submit search query"
src="<?php echo get_template_directory_uri(); ?>/images/search.png">
</form>