• 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

Viewing 4 replies - 1 through 4 (of 4 total)
  • lisa

    (@contentiskey)

    have you tried to remove the theme?
    are you using a child theme or just original theme?
    have you tried to install a theme like 2012 to see if same issue happens?
    what plugins are activated?

    Thread Starter RickC4

    (@rickc4)

    Problem goes away if I remove theme but I have done a lot of work on configuring the theme, just trying to find out what is wrong with it.

    I have hardly any plugins at all, contact form 7 and really simple capcha which I have used on hundreds of sites.

    Just trying to figure out where this theme has got itself tied up.

    The link suggested this is a PHP issue with white space, then it goes on about one bit of code calling another and something going wrong at which point I go glass eyed.

    I am happy to edit the code or move one line to another but rewriting is too much.

    I was hoping this might be an easy fix, all I have done is config the various colors of the theme and the layout options.

    lisa

    (@contentiskey)

    have you edited any of the orignal theme PHP template files?
    what theme is in use?
    are you able to access the theme via FTP in WP Content folder?

    Thread Starter RickC4

    (@rickc4)

    I have come to the conclusion that the theme was badly written, the author seems to have disappeared.

    I looked at another theme of his and it was pretty much the same, it worked initially but as you configured the settings it started displaying hundred of those errors to the point where you could not login to backend and had to remove theme with FTP.

    I was hoping I could trace the error, hence I asked what the 2226 referred to, I looked at line 2226 of functions.php but no error was obvious and this link suggested it was whitespace but I could not find any:

    https://ww.wp.xz.cn/support/topic/warning-cannot-modify-header-information-headers-already-sent-by-2

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Simple way to fix’ is closed to new replies.