Slightest change to function.php 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!
The topic ‘Slightest change to function.php causes error’ is closed to new replies.