Is there a way to read or list wp_head() contents?
I wanted to search-and-replace in the header, but Neither @majick or @Samuel Elh answers worked for me directly. So, combining their answers I got what eventually works: function start_wp_head_buffer() { ob_start(); } add_action(‘wp_head’,’start_wp_head_buffer’,0); function end_wp_head_buffer() { $in = ob_get_clean(); // here do whatever you want with the header code echo $in; // output the result … Read more