How to change http header 'Content-type' in Wordpress
function changeHeaders($headers)
{
$headers['Content-Type'] = 'application/json; charset=utf-8';
return $headers;
}
add_filter('wp_headers', 'changeHeaders');
Written by Romulo De Lazzari
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Php
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#