Forums

[resolved] Warning: Cannot modify header information - headers already sent by (5 posts)

  1. melissa wade
    Member
    Posted 2 years ago #

    I changed the category-template file so I could have a tag list instead of tag cloud when using the tag cloud widget. Everything seemed fine and I actually had to try several times to get it right so I was viewed the admin side several times after making the change.

    I then deleted a post which I had "stickied" at the top. Not sure if you are supposed to "unsticky" first, but it was when I hit delete that I got a warning message first. I looked at the blog and it seemed fine so I didn't think any more about it.

    Then when I went to log in again later I got the warning (beginning is the title and then this is the rest:

    (output started at /home/hocke10/public_html/blog/wp-includes/category-template.php:1) in /home/hocke10/public_html/blog/wp-login.php on line 290 (repeated a second time with the line number changed to 302)

    I looked for this warning, but none seemed to be using the current version of WordPress and they also mentioned having extra spaces at the end. I checked the file I changed and it did seem to have an extra line at the end even though I hadn't done anything to that part of the code; I deleted the space; reuploaded, but the problem is still the same.

    As things stand, I cannot log into the admin.

    I am also a newbie so if you know what is wrong, please be patient and spell out the steps for me.

    Thanks.

  2. iridiax
    Member
    Posted 2 years ago #

    I would not recommend editing core WordPress files like wp-includes/category-template.php. As you can see, it's too easy to break things by doing this, and WordPress updates will just erase your changes. Download the same version of WordPress and replace the bad category-template.php file with a fresh copy.

  3. melissa wade
    Member
    Posted 2 years ago #

    Is there another way to make the Tag Cloud widget generate a Tag List instead of Cloud? I had to use the widgets as the Text Widget was the only way I could find to add the Photoshelter Archive Search code to the sidebar. (Had successfully edited the sidebar.php to generate a tag list instead of cloud, but couldn't get the archive search to work - not sure if it was a conflict between that and the blog search code (wanted both), but widgets seemed to be the only answer.)

  4. melissa wade
    Member
    Posted 2 years ago #

    Okay, I tried putting the original file back (I had saved it) and it didn't solve the problem, just meant the sidebar had a tag cloud instead of list (I've gone back to the revised now).

    I really think the issue started when I deleted the stickied post. Any other suggestions?

  5. melissa wade
    Member
    Posted 2 years ago #

    Resolution - I had been editing the .php file using notepad. I went back to the original and edited using textpad instead (googled what to use to edit .php files) and now everything works again.

Topic Closed

This topic has been closed to new replies.

About this Topic