Last Updated: February 25, 2016
·
4.776K
· romulodl

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');