Simple way to fix
-
Something has happened to a theme I am using, I have done nothing other than config the options and now I am getting all these errors.
The theme author has disappeared, so I am hoping someone here can help
So I am getting these “Cannot modify header information – headers already sent by” they seem to be only in the backend, at first I would just do BACK and the options had saved but now it is all over
Even If I log out on the WP login I get it. e.g.
Warning: Cannot modify header information – headers already sent by (output started at /home/USER/site.com/wp-content/themes/mytheme/functions.php:2226) in /home/USER/Site.com/wp-login.php on line 418
Warning: Cannot modify header information – headers already sent by (output started at /home/USER/site.com/wp-content/themes/mytheme/functions.php:2226) in /home/USER/Site.com/wp-login.php on line 431
I want to know what the 2226 refers to and why it affects WP-login
Line 2226 of functions.php is
<?php } if ( get_option( 'my_post_metadetails' ) == "Hide") { ?> <style> .postmeta{ display: none !important; } </style> <?php } else {}418 of wp-login.php is
header('Content-Type: '.get_bloginfo('html_type').'; charset='.get_bloginfo('charset'));431 of wp-login.php is
setcookie( TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN, $secure );I saw this thread but it is closed and too complicated anyway.
https://ww.wp.xz.cn/support/topic/warning-cannot-modify-header-information-headers-already-sent-by-2
What is causing this, I did not have this all day and now it is all over
The topic ‘Simple way to fix’ is closed to new replies.