First of all, you misunderstood “How do I solve the Headers already sent warning problem?”
As you said, you’ve changed:
function mhm_footerheader_position ()
to:
function mhm_footerheader_position()
The only difference I see is the space
between mhm_footerheader_position
and ()
. The whitespace problem in header already sent error
, isn’t about the space between function_name
and ()
. It’s about space
that gets into the output before any HTTP header is sent.
Secondly, you don’t want to output anything in widgets_init
action, this the the wrong place for any output. The error you are getting is because you are giving output in widgets_init
action and in wp-login.php
HTTP header is being sent after this action hook.
I can’t say exactly where you want to output the footer-header
widget area, it depends on your theme. However, the following CODE will output it in the footer and solve your Error:
function mhm_footerheader_position () {
echo '<div id="footer-header"><div class="wrap">';
genesis_widget_area('footer-header');
echo '</div></div>';
}
add_action ('wp_footer','mhm_footerheader_position');
You may read this to understand the Hearer Already Send Error better.