I am writing a plug-in that creates new front/home page from scratch. Below code works nice and it outputs the text before the themes outputs anything. So the question is how can I remove the theme creating any html code?
Basically I want the plug-i to start with blank home page regardless of any theme that is currently active.
add_action('wp_head', 'new_front_page');
function new_front_page(){
if (is_front_page()){
echo 'is_front_page():'.is_front_page();
}
}
}
I am testing this on wp 3.6 and twenty thirteen.
Of course anyone is welcomed to suggest better what how to do that.