Title: Error When Changing functions.php
Last modified: August 19, 2016

---

# Error When Changing functions.php

 *  [jquintana83](https://wordpress.org/support/users/jquintana83/)
 * (@jquintana83)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/error-when-changing-functionsphp/)
 * Let me try this again…

Viewing 1 replies (of 1 total)

 *  Thread Starter [jquintana83](https://wordpress.org/support/users/jquintana83/)
 * (@jquintana83)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/error-when-changing-functionsphp/#post-1016245)
 * I am trying to register a sidebar in my functions.php file. All I have done is
   copy/paste a new line of code after the last sidebar was registered. For example:
 * My original code:
 *     ```
       // Setting up our widgetized sidebars
       if ( function_exists('register_sidebar') ) {
       register_sidebar(array('name'=>'Homepage Bottom Left','before_widget' => '<div id="boxleft">','after_widget' => '</div>','before_title' => '<h2>','after_title' => '</h2>',));
       register_sidebar(array('name'=>'Homepage Bottom Middle','before_widget' => '<div id="boxmiddle">','after_widget' => '</div>','before_title' => '<h2>','after_title' => '</h2>',));
       register_sidebar(array('name'=>'Homepage Bottom Right','before_widget' => '<div id="boxright">','after_widget' => '</div>','before_title' => '<h2>','after_title' => '</h2>',));
       register_sidebar(array('name'=>'Post Sidebar','before_widget' => '<li>','after_widget' => '</li>','before_title' => '<h2>','after_title' => '</h2>',));
       register_sidebar(array('name'=>'Page Sidebar','before_widget' => '<li>','after_widget' => '</li>','before_title' => '<h2>','after_title' => '</h2>',));
       register_sidebar(array('name'=>'Tabber Sidebar','before_widget' => '<li>','after_widget' => '</li>','before_title' => '<h2>','after_title' => '</h2>',));
       }
       ```
   
 * My modified code:
 *     ```
       // Setting up our widgetized sidebars
       if ( function_exists('register_sidebar') ) {
       register_sidebar(array('name'=>'Homepage Bottom Left','before_widget' => '<div id="boxleft">','after_widget' => '</div>','before_title' => '<h2>','after_title' => '</h2>',));
       register_sidebar(array('name'=>'Homepage Bottom Middle','before_widget' => '<div id="boxmiddle">','after_widget' => '</div>','before_title' => '<h2>','after_title' => '</h2>',));
       register_sidebar(array('name'=>'Homepage Bottom Right','before_widget' => '<div id="boxright">','after_widget' => '</div>','before_title' => '<h2>','after_title' => '</h2>',));
       register_sidebar(array('name'=>'Post Sidebar','before_widget' => '<li>','after_widget' => '</li>','before_title' => '<h2>','after_title' => '</h2>',));
       register_sidebar(array('name'=>'Page Sidebar','before_widget' => '<li>','after_widget' => '</li>','before_title' => '<h2>','after_title' => '</h2>',));
       register_sidebar(array('name'=>'Tabber Sidebar','before_widget' => '<li>','after_widget' => '</li>','before_title' => '<h2>','after_title' => '</h2>',));
       register_sidebar(array('name'=>'Services Sidebar','before_widget' => '<li>','after_widget' => '</li>','before_title' => '<h2>','after_title' => '</h2>',));
       }
       ```
   
 * That is the ONLY change I have made to my functions.php file. After uploading
   to the serverr I get the following error:
 * >  Warning: Cannot modify header information – headers already sent by (output
   > started at /home/jquintan/public_html/mydoman.com/wp-content/themes/iRealEstate/
   > functions.php:1) in /home/jquintan/public_html/mydomain.com/wp-includes/functions.
   > php on line 698
   > Warning: Cannot modify header information – headers already sent by (output
   > started at /home/jquintan/public_html/mydomain.com/wp-content/themes/iRealEstate/
   > functions.php:1) in /home/jquintan/public_html/mydomain.com/wp-includes/functions.
   > php on line 699
 * If anyone could help out I would greatly appreciate it!
 * The ultimate goal is to have diffeent pages use different sidebars.
 * Thanks!

Viewing 1 replies (of 1 total)

The topic ‘Error When Changing functions.php’ is closed to new replies.

## Tags

 * [cannot modify header](https://wordpress.org/support/topic-tag/cannot-modify-header/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [jquintana83](https://wordpress.org/support/users/jquintana83/)
 * Last activity: [17 years, 2 months ago](https://wordpress.org/support/topic/error-when-changing-functionsphp/#post-1016245)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
