WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Cannot modify header information - headers already sent by (3 posts)

  1. nlex
    Member
    Posted 6 years ago #

    Hey

    I was tryin to make my site bilingual and that plugin needed to ass a functions.php file i created and i wrote this :

    <!-- begin functions -->
    <?php load_theme_textdomain('simple'); ?>
    <!-- end functions -->

    it worked for the site and the plugin but i can't login to my admin panel, instead i have this message :

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/12/d199687361/htdocs/wp/wp-content/themes/simple/functions.php:2) in /homepages/12/d199687361/htdocs/wp/wp-includes/pluggable.php on line 694

    NB. first i created the file as 'function' without the 's' and saved the file then corrected it, same for 'begin' 'end' i don't know if its related to this

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Change your functions.php to this:

    <?php
    load_theme_textdomain('simple');
    ?>

    A theme's functions.php file must NEVER made any real output. It must start with <?php and end with ?>.

  3. nlex
    Member
    Posted 6 years ago #

    Wow thanks it works, you'r a genius ! :)

Topic Closed

This topic has been closed to new replies.

About this Topic