Archived topic
IE8 Placeholder text for Search box
1 reply · Started by Matthew on January 27, 2016
Hi,
In IE8 the placeholder text "Search..." doesn't appear. It appears there are a number of known solutions: http://stackoverflow.com/questions/15020826/how-to-support-placeholder-attribute-in-ie8-and-9
Could you add a fix to the next version of the theme please? Note some of the solutions break form submission so watch out!
Thanks, Matt
Hi Matt,
Unfortunately the solution means adding a 300 line javascript code to the theme just for IE8 placeholders - not sure how I feel about that.
If you need to support IE8, give this plugin a try: https://wordpress.org/plugins/html5-placeholder-polyfill/
It hasn't been updated in a while, but I took a look at the code and it's harmless.
Once installed and activated, add this code into "GP Hooks > wp_footer":
<script>
jQuery('.search-field').placeholder();
</script>
That should do it :)
