• Resolved Armatus

    (@armatus)


    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

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator t-p

    (@t-p)

    Moderator keesiemeijer

    (@keesiemeijer)

    How to post code in WordPress forum topics: https://codex.www.ads-software.com/Forum_Welcome#Posting_Code

    Thread Starter Armatus

    (@armatus)

    Thanks Keesie. I changed the links from this:

    <li class=\"bk0\"><a href=\"https://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=\"https://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=\"https://mac-host.com/support\" style=\"background: url('".$theme_url."/imagemenu/images/5.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk5\"><a href=\"https://mac-host.com/support\" style=\"background: url('".$theme_url."/imagemenu/images/6.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk6\"><a href=\"https://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=\"https://sanpetemilitiapaintball.com\" style=\"background: url('".$theme_url."/imagemenu/images/1.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk1\"><a href=\"https://sanpetemilitiapaintball.com/team\" style=\"background: url('".$theme_url."/imagemenu/images/2.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk2\"><a href=\"https://sanpetemilitiapaintball.com/members\" style=\"background: url('".$theme_url."/imagemenu/images/3.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk3\"><a href=\"https://sanpetemilitiapaintball.com/snapshots\" style=\"background: url('".$theme_url."/imagemenu/images/4.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk4\"><a href=\"https://sanpetemilitiapaintball.com/videos\" style=\"background: url('".$theme_url."/imagemenu/images/5.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk5\"><a href=\"https://sanpetemilitiapaintball.com/events\" style=\"background: url('".$theme_url."/imagemenu/images/6.jpg') repeat scroll 0%;\">slidingdoor</a></li>
    			<li class=\"bk6\"><a href=\"https://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 https://mac-host.com/support\ to https://sanpetemilitiapaintball.com/contact\ that’s it. Just the urls.

    Moderator keesiemeijer

    (@keesiemeijer)

    Are you echoing these links.

    Thread Starter Armatus

    (@armatus)

    Echoing? I’m not sure what that means… If you go to my site, https://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.

    Moderator keesiemeijer

    (@keesiemeijer)

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

    try:

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

    Thread Starter Armatus

    (@armatus)

    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.

    Moderator t-p

    (@t-p)

    Glad you got it working. ??

    Thread Starter Armatus

    (@armatus)

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

    Moderator t-p

    (@t-p)

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

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Warning: cannot modify header information’ is closed to new replies.