WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Error! Please help (4 posts)

  1. levani01
    Member
    Posted 5 years ago #

    Can anyone explain me what does this error mean:

    Warning: Cannot modify header information - headers already sent by (output started at /home/answersg/public_html/wp-content/themes/answers/functions.php:123) in /home/answersg/public_html/wp-includes/pluggable.php on line 850

  2. GrandSlambert
    Member
    Posted 5 years ago #

    Yes, there is an extra line or two in the functions.php file that is causing this problem. If you can edit the file (it's part of the theme you are using), look at the very end where you will see a ?>, which indicates the end of PHP code. Remove any extra space or blank lines after that - the ?> needs to be on the last line of the code with NO spaces or anything after it.

    If you can't edit the file, contact the theme developer and let them know they have extra space in the end of that file and ask them to fix it. Heck, even if you can edit the file, let them know so others don't have the same problem.

  3. levani01
    Member
    Posted 5 years ago #

    Thanks. There were two extra lines after ?> in functions.php

    Thanks again

  4. GrandSlambert
    Member
    Posted 5 years ago #

    Glad I could help. This is very common in theme development and any PHP development. If you come across this kind of error "Headers Alrady Sent", it's great the PHP tells you not only what file home/answersg/public_html/wp-content/themes/answers/functions.php but also what line 123 - notice that in the error above? It does help debugging issues a lot. Good thing that you posted the error so I could help you so quickly. :)

Topic Closed

This topic has been closed to new replies.

About this Topic