When you say there’s no space between the two I assume you mean the line with the if statement and the final line with the closing tag. If so, it’s fine to have space in between, there just can’t be any space after the closing ‘?>’ on the final line.
This is the most normal culprit, though certainly not the only one.
Yes, there is no space after the closing ‘?>’
But that line is 2285, and the error message says 2284.
Could the function be creating a weird space in the header?
Could it be a different file?
Wordfence says that none of my files differ with what’s offered by WordPress (although I assume it doesn’t include files like config.php and functions.php, which are by nature different.
I’m stymied.
Have you tried switching to a default WordPress theme? If the error goes away at least then you would know it’s definitely a problem with the theme. If that doesn’t work, try disabling all your plugins as well. It could be possible something is trying to set a header (often it’s setting a cookie) after the headers have been sent but during output of HTML.
You could comment our line 2284, but it may not actually be the cause of the problem, especially if it’s not a white space issue.
Thanks– will try commenting out and changing (temporarily) the theme tonight. Our event is in 10 days, so I can’t really mess around with the design too much, and can only work late at night. Fortunately, the site seems to mostly work, except for when I try to log in/out or put a password on a post. (And didn’t really start happening until the latest WordPress update)
I’m thinking it’s my (older) theme doing something wonky. But it doesn’t look like the designer updates anymore, and as I said, I can’t mess around too much– our event is coming up soon, and I can’t have the site go down.
Is there a way to backtrack the WordPress installations?
You can alway try the Safe Mode plugin, but I think we’re pretty sure it’s a theme issue. But this would at least guarantee it’s the theme or a plugin (it deactivates plugins and changes to a default theme, if one is available, on a per page request basis).
Actually changing the theme temporarily and leaving plugins as is would at least tell you for certain that it’s the theme. If theme is not being maintained, it’s highly likely that it’s the problem. I’d also worry about security at some point if it’s not being updated. (and of course WordPress core and plugins need to be kept up to date)