Title: Adding functions.php to child theme
Last modified: August 31, 2016

---

# Adding functions.php to child theme

 *  Resolved [cherylweb27](https://wordpress.org/support/users/cherylweb27/)
 * (@cherylweb27)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/adding-functionsphp-to-child-theme-2/)
 * I’ve loaded the theme onto a fresh new install of WordPress. I then loaded my
   own child theme (style.css and functions.php, both with no theme modifications),
   and got the following error:
 * > Warning: Cannot modify header information – headers already sent by (output
   > started at /home2/cheryl27/public_html/notsoalternateideas.com/wp-content/themes/
   > Mesocolumn Child Theme/functions.php:6) in /home2/cheryl27/public_html/notsoalternateideas.
   > com/wp-includes/pluggable.php on line 1228
 * (Or something similar… the “on line xxx” might have been different, but everything
   else was the same.)
 * So then I deleted my child theme (the error went away), and loaded the theme-
   provided child theme. With ONLY the theme-provided child theme, there were no
   errors.
 * Then I created a “blank” functions.php, with only the following in it:
 * > <?php
   >  // Your php code goes here ?>
 * and the error returned (this is the current “on line xxx” error):
 * > Warning: Cannot modify header information – headers already sent by (output
   > started at /home2/cheryl27/public_html/notsoalternateideas.com/wp-content/themes/
   > Mesocolumn Child Theme/functions.php:6) in /home2/cheryl27/public_html/notsoalternateideas.
   > com/wp-includes/pluggable.php on line 1228
 * What’s going on? How can I include a functions.php in my child theme?
 * Site Link: [http://notsoalternateideas.com/](http://notsoalternateideas.com/)
 * Thanks for the help! 🙂

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Theme Author [Richie KS](https://wordpress.org/support/users/rkcorp/)
 * (@rkcorp)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/adding-functionsphp-to-child-theme-2/#post-6980345)
 * probably the theme folder name ‘Mesocolumn Child Theme’
    try rename it to mesocolumn-
   child-theme
 *  Thread Starter [cherylweb27](https://wordpress.org/support/users/cherylweb27/)
 * (@cherylweb27)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/adding-functionsphp-to-child-theme-2/#post-6980346)
 * Where do you see that? When I look at my site’s files via cPanel & File Manager,
   I see the following path:
 * wp-content >> themes >> mesocolumn-child
 * Do I need to reinstall the child theme, and adjust the folder name before uploading?
 *  Thread Starter [cherylweb27](https://wordpress.org/support/users/cherylweb27/)
 * (@cherylweb27)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/adding-functionsphp-to-child-theme-2/#post-6980347)
 * Ohhhh…. I see it in the path of the error…. but I don’t know where that’s coming
   from??? That was the original child theme that I deleted.
 *  Thread Starter [cherylweb27](https://wordpress.org/support/users/cherylweb27/)
 * (@cherylweb27)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/adding-functionsphp-to-child-theme-2/#post-6980348)
 * Sorry for the confusion! I think I might have cut & pasted the wrong error.
 * THIS IS THE CURRENT ERROR…
 * > Warning: Cannot modify header information – headers already sent by (output
   > started at /home2/cheryl27/public_html/notsoalternateideas.com/wp-content/themes/
   > mesocolumn-child/functions.php:4) in /home2/cheryl27/public_html/notsoalternateideas.
   > com/wp-includes/option.php on line 820
   > Warning: Cannot modify header information – headers already sent by (output
   > started at /home2/cheryl27/public_html/notsoalternateideas.com/wp-content/themes/
   > mesocolumn-child/functions.php:4) in /home2/cheryl27/public_html/notsoalternateideas.
   > com/wp-includes/option.php on line 821
 * (I never would have caught that if you hadn’t mentioned the folder name. Good
   catch! Sorry for the confusion. 🙁 )
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/adding-functionsphp-to-child-theme-2/#post-6980349)
 * what editor are you using to create the new functions.php file?
    there must not
   be any characters or empty lines before and after the php tags.
 * [https://codex.wordpress.org/Editing_Files](https://codex.wordpress.org/Editing_Files)
 *  Thread Starter [cherylweb27](https://wordpress.org/support/users/cherylweb27/)
 * (@cherylweb27)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/adding-functionsphp-to-child-theme-2/#post-6980350)
 * I just put it in a text file (notepad on Windows), then saved it as functions.
   php.
 * I don’t think there are any characters or empty lines before the **<?php** and
   after the **?>**
 * I didn’t know there needed to be…?
 * I will try putting them in, to see if that fixes the situation.
 *  Thread Starter [cherylweb27](https://wordpress.org/support/users/cherylweb27/)
 * (@cherylweb27)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/adding-functionsphp-to-child-theme-2/#post-6980351)
 * I added lines before & after everything in the functions.php file. No change.
   Thanks though [@michael](https://wordpress.org/support/users/michael/) !! 🙂
 *  Thread Starter [cherylweb27](https://wordpress.org/support/users/cherylweb27/)
 * (@cherylweb27)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/adding-functionsphp-to-child-theme-2/#post-6980352)
 * I’m really a winner tonight… lol 🙂
 * Michael, I re-read your post… like 5 times… and realized that you actually meant
   that there SHOULD NOT be any spaces or lines after the open & close php tags 
   in functions.php.
 * So I double-checked, and yes, there was one rouge space after the close php tag.
 * So I removed it (along with the spaces I mistakenly added a few minutes ago),
   and VOILA! The errors are gone.
 * Thanks soooooo much for your help!!!! 🙂 🙂 🙂

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Adding functions.php to child theme’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/mesocolumn/1.6.5.1/screenshot.
   png)
 * MesoColumn
 * [Support Threads](https://wordpress.org/support/theme/mesocolumn/)
 * [Active Topics](https://wordpress.org/support/theme/mesocolumn/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/mesocolumn/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/mesocolumn/reviews/)

## Tags

 * [child theme](https://wordpress.org/support/topic-tag/child-theme/)
 * [functions](https://wordpress.org/support/topic-tag/functions/)

 * 8 replies
 * 3 participants
 * Last reply from: [cherylweb27](https://wordpress.org/support/users/cherylweb27/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/adding-functionsphp-to-child-theme-2/#post-6980352)
 * Status: resolved