WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Cannot modify header information - headers already sent by functions.php (2 posts)

  1. 3Plumes
    Member
    Posted 3 years ago #

    I keep getting the same error ever since I added a functions.php file to my theme:

    Warning: Cannot modify header information - headers already sent by (output started at /home/capstone/public_html/dev/chspp/wp-content/themes/cpp02/functions.php:1) in /home/capstone/public_html/dev/chspp/wp-includes/pluggable.php on line 897

    It's weird, I've search everywhere and the solution appears to be one that recommends looking for and removing all trailing and leading spaces. I've found none, yet the problem still exists whenever I save a page.

    The functions.php code is:

    <?php
    function register_my_menus() {
      register_nav_menus(
        array('header-menu' => __( 'Header Menu' ), 'footer-menu' => __( 'Footer Menu' ) )
      );
    }
    
    add_action( 'init', 'register_my_menus' );
    ?>

    Any ideas on how I may fix this?

  2. 3Plumes
    Member
    Posted 3 years ago #

    Figured it out. Although I couldn't see it, there had to have been spaces there. I followed the directions from the following post:

    http://wordpress.org/support/topic/rss2-problem-please-help-me?replies=3

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.