Here is the code I’ve used, based on the original question and on Dominic P’s answer.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | /* * Modify HTTP header */ function add_header_xua($headers) { // var_dump($headers); #=> if you want to see the current headers... if (!is_admin()) { $headers['X-UA-Compatible'] = 'IE=edge,chrome=1'; } return $headers; } add_filter('wp_headers', 'add_header_xua'); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.