Support » Fixing WordPress » Header error in single post search results

  • When doing a search for some ,but not all terms, I get the following error message:
    Cannot modify header information – headers already sent by
    (output started at /hostpath/ in <b>/hostpath/</b>
    on line <b>351</b>
    Looking at the file, it seems to be related to search results that only return one post.

Viewing 7 replies - 1 through 7 (of 7 total)
  • oops, sorry about the long line.
    the file name is code>wp-blog-header.php, if anyone wonders.

    *bump* and a recap:
    Warning: Cannot modify header information – headers already sent by (output started at index.php:20) in wp-blog-header.php on line 359
    URI: – try searching for “bloggies”or “propaganda” (both terms only appear in one post).

    I am having this problem as well. To those who are getting this error, do you have your wordpress install in a seperate directory from your blog? This might not be the case, but it couldn’t hurt to ask.

    My install is in the same directory as my blog. I don’t know about everyone else?

    I just fixed the problem for myself. I was using 1.01 code in my 1.2 header, innacurately to boot. Make sure your index.php file starts out like thus:
    /* Don't remove this line. */
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <html xmlns="">

    Also, if you have the following bit of code in your index.php, you can delete it (doesn’t come included in the 1.2 index.php):
    /* Don't remove these lines. */
    $blog = 1;

    I hope this helps anyone who encounters the same problem. The beginning of my old index.php that I was using was *totally* different than the new index.php that comes with 1.2.

    Darn anti-spam protection is preventing me from making an edit, even after 5 minutes.
    In the code above, I forgot to change the following line (that I modified)
    to its default
    Sorry about the confusion…

    You know, the ONLY thing I changed was the <head> tag from what I had to what you specified… and now it seems to work. I wonder if it was working before for some reason. In any case, it is working now and I am very pleased!! So thanks for the tip. ^_^
    I can’t think of any reason the head tag would be the source of the problem for me, but then, I’m not all that code-savvy anyhow. 😀

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Header error in single post search results’ is closed to new replies.