WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Warning: cannot modify header information (11 posts)

  1. Armatus
    Member
    Posted 3 years ago #

    I am not sure which version of WordPress I am using, as I cannot login to my admin. But I have only had it for a few months, if that even helps...

    Anyway, as I said, I can't login to my /wp-admin login. It gives me this error:
    Warning: Cannot modify header information - headers already sent by (output started at /home/content/58/7815858/html/wp-content/themes/sliding-door/functions.php:1) in /home/content/58/7815858/html/wp-includes/pluggable.php on line 897

    I have searched and read several posts on how to solve this problem. But when I go to the end of my document, there aren't any blank spaces at the end, and there's no ?> at the end either.

    I'm using the sliding-door theme, and the only thing I have changed in the functions.php file was change this

    <li class=\"bk0\">slidingdoor
    <li class=\"bk1\">slidingdoor
    <li class=\"bk2\">slidingdoor
    <li class=\"bk3\">slidingdoor
    <li class=\"bk4\">slidingdoor
    <li class=\"bk5\">slidingdoor
    <li class=\"bk6\">slidingdoor
    ";

    to this (I only changed the web url from sliding doors links to my page tabs... Really shouldnt have screwed anything up?)

    <li class=\"bk0\">slidingdoor
    <li class=\"bk1\">slidingdoor
    <li class=\"bk2\">slidingdoor
    <li class=\"bk3\">slidingdoor
    <li class=\"bk4\">slidingdoor
    <li class=\"bk5\">slidingdoor
    <li class=\"bk6\">slidingdoor
    ";

    So what the heck is wrong and how can I definitively pinpoint the culprit? And is there a simple way to find line 897?

    I appreciate anyones help.. I know this has been posted a lot, but I am very new to this and I've tried the remedies from the posts I have already read and it's not working. Thanks in advance.

    Dave

  2. Tara
    Member
    Posted 3 years ago #

  3. keesiemeijer
    moderator
    Posted 3 years ago #

    How to post code in WordPress forum topics: http://codex.wordpress.org/Forum_Welcome#Posting_Code

  4. Armatus
    Member
    Posted 3 years ago #

    Thanks Keesie. I changed the links from this:

    <li class=\"bk0\"><a href=\"http://mac-host.com/support\" style=\"background: url('".$theme_url."/imagemenu/images/1.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk1\"><a href=\"".$blog_url."\" style=\"background: url('".$theme_url."/imagemenu/images/2.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk2\"><a href=\"".$blog_url."\" style=\"background: url('".$theme_url."/imagemenu/images/3.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk3\"><a href=\"http://mac-host.com/slidingdoor/slider.zip\" style=\"background: url('".$theme_url."/imagemenu/images/4.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk4\"><a href=\"http://mac-host.com/support\" style=\"background: url('".$theme_url."/imagemenu/images/5.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk5\"><a href=\"http://mac-host.com/support\" style=\"background: url('".$theme_url."/imagemenu/images/6.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk6\"><a href=\"http://mac-host.com/support\" style=\"background: url('".$theme_url."/imagemenu/images/7.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    				</ul>";

    to this:

    <li class=\"bk0\"><a href=\"http://sanpetemilitiapaintball.com\" style=\"background: url('".$theme_url."/imagemenu/images/1.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk1\"><a href=\"http://sanpetemilitiapaintball.com/team\" style=\"background: url('".$theme_url."/imagemenu/images/2.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk2\"><a href=\"http://sanpetemilitiapaintball.com/members\" style=\"background: url('".$theme_url."/imagemenu/images/3.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk3\"><a href=\"http://sanpetemilitiapaintball.com/snapshots\" style=\"background: url('".$theme_url."/imagemenu/images/4.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk4\"><a href=\"http://sanpetemilitiapaintball.com/videos\" style=\"background: url('".$theme_url."/imagemenu/images/5.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk5\"><a href=\"http://sanpetemilitiapaintball.com/events\" style=\"background: url('".$theme_url."/imagemenu/images/6.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk6\"><a href=\"http://sanpetemilitiapaintball.com/contact\" style=\"background: url('".$theme_url."/imagemenu/images/7.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    				</ul>";

    So all I changed was the links such as http://mac-host.com/support\ to http://sanpetemilitiapaintball.com/contact\ that's it. Just the urls.

  5. keesiemeijer
    moderator
    Posted 3 years ago #

    Are you echoing these links.

  6. Armatus
    Member
    Posted 3 years ago #

    Echoing? I'm not sure what that means... If you go to my site, http://www.sanpetemilitiapaintball.com, there are picture sliders at the top. They are like my tabs to go to different sections of my site. If you hover over the picture, it will show the URL at the bottom of the browser... Well the stock/sample theme had urls to their support site.. All i did was go into the functions.php file and change the urls to the corresponding sliders.

  7. keesiemeijer
    moderator
    Posted 3 years ago #

    Wel it does look like you are echoing these links: http://php.net/manual/en/function.echo.php

    try:

    <?php
    echo "<ul><li class=\"bk0\"><a href=\"http://sanpetemilitiapaintball.com\" style=\"background: url('".$theme_url."/imagemenu/images/1.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk1\"><a href=\"http://sanpetemilitiapaintball.com/team\" style=\"background: url('".$theme_url."/imagemenu/images/2.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk2\"><a href=\"http://sanpetemilitiapaintball.com/members\" style=\"background: url('".$theme_url."/imagemenu/images/3.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk3\"><a href=\"http://sanpetemilitiapaintball.com/snapshots\" style=\"background: url('".$theme_url."/imagemenu/images/4.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk4\"><a href=\"http://sanpetemilitiapaintball.com/videos\" style=\"background: url('".$theme_url."/imagemenu/images/5.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk5\"><a href=\"http://sanpetemilitiapaintball.com/events\" style=\"background: url('".$theme_url."/imagemenu/images/6.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk6\"><a href=\"http://sanpetemilitiapaintball.com/contact\" style=\"background: url('".$theme_url."/imagemenu/images/7.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    				</ul>";
     ?>

    maybe you don't need the <?php ?> tags. Try also without them if it does not work.

  8. Armatus
    Member
    Posted 3 years ago #

    I actually think I got it working.. The error is gone now.. I went to t-p's link. I never saw that troubleshooting guide when I was doing my searches. Thanks for the assistance, guys. Hopefully it does not return.

    for reference, I tried the first steps in the guide where it says to go between ? and > and deleted... It still didnt work.. Then I went in front of <?php and deleted to the left of the word and now its working.. So evidently one of those moves fixed it.

  9. Tara
    Member
    Posted 3 years ago #

    Glad you got it working. :-)

  10. Armatus
    Member
    Posted 3 years ago #

    Yeah, now to just try and figure out my other problems. lol Thanks again for the help.

  11. Tara
    Member
    Posted 3 years ago #

    for better response, I suggest you start new threads for other problems

Topic Closed

This topic has been closed to new replies.

About this Topic