Title: Slightest change to function.php causes error
Last modified: August 30, 2016

---

# Slightest change to function.php causes error

 *  [dee_c](https://wordpress.org/support/users/dee_c/)
 * (@dee_c)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/slightest-change-to-functionphp-causes-error/)
 * I’m using a code to make a ratings plugin appear in my custom taxonomy.
 *     ```
       if ( $terms ) {
       			foreach ( $terms as $term ) {
   
       				if ( in_array( $term->name, array( 'Services', 'Book Designing', 'Coaching and Consulting',
       						'Copywriting', 'Critiquing', 'Editing', 'Freelance Writing', 'Literary Agent',
       						'Marketing and Promoting', 'Proofreading', 'Publishing' ) ) ) {
       					$found = true;
       					break;
       				}
       ```
   
 * It should appear in all the categories listed here, but I noticed that instead
   of “Literary Agents,” the plugin developer wrote “Literary Agent,” and so the
   ratings don’t show in that category. I simply added an “s” to the end, and I 
   get this error on the front end:
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/curveson/public_html/wp-content/themes/template_New_Child_Theme_1/functions.
   php:1) in /home/curveson/public_html/wp-content/themes/BT/framework/class/class_layout.
   php on line 152
 * It doesn’t matter what I do in this file. The smallest of changes creates an 
   error. Can someone help me with this? I have no idea how to change Agent to Agents
   without an error. I’d really appreciate some help. Thanks!

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

 *  [stephencottontail](https://wordpress.org/support/users/stephencottontail/)
 * (@stephencottontail)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/slightest-change-to-functionphp-causes-error/#post-6332040)
 * In your `functions.php`, the opening PHP tag (`<?php`) must be the very first
   thing in the file, with no spaces, tabs, line breaks, etc. before it. Can you
   check to make sure you didn’t accidentally add a space or anything else before
   the opening tag?
 *  Thread Starter [dee_c](https://wordpress.org/support/users/dee_c/)
 * (@dee_c)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/slightest-change-to-functionphp-causes-error/#post-6332045)
 * Thanks for responding so quickly!
 * There are no spaces before the opening tag. In fact, everything was working fine
   before I added the ‘s’.
 * At first the developer told me what custom code to use in my functions.php. Every
   time I added the code, I got that error. I used Filezilla, which is usually perfect
   for me. The developer then added the code for me with no problems.
    Now I want
   to add a single ‘s’ and I get an error. I’m baffled.
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/slightest-change-to-functionphp-causes-error/#post-6332078)
 * what method are you using to edit that file?
 * [https://codex.wordpress.org/Editing_Files](https://codex.wordpress.org/Editing_Files)
 *  Thread Starter [dee_c](https://wordpress.org/support/users/dee_c/)
 * (@dee_c)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/slightest-change-to-functionphp-causes-error/#post-6332086)
 * I use an FTP Client which opens up Notepad. I’ve never had a problem with this
   before.
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [10 years, 10 months ago](https://wordpress.org/support/topic/slightest-change-to-functionphp-causes-error/#post-6332215)
 * Copy all of the code from your functions.php file and paste it into PasteBin:
   [http://pastebin.com](http://pastebin.com)
 * Then link us that
 *  Thread Starter [dee_c](https://wordpress.org/support/users/dee_c/)
 * (@dee_c)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/slightest-change-to-functionphp-causes-error/#post-6332220)
 * Thanks! Here’s the link:
 * [http://pastebin.com/7fyTmrjR](http://pastebin.com/7fyTmrjR)

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

The topic ‘Slightest change to function.php causes error’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 4 participants
 * Last reply from: [dee_c](https://wordpress.org/support/users/dee_c/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/slightest-change-to-functionphp-causes-error/#post-6332220)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
