{"id":6331918,"date":"2015-07-15T20:34:29","date_gmt":"2015-07-15T20:34:29","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/slightest-change-to-functionphp-causes-error\/"},"modified":"2016-08-30T15:47:03","modified_gmt":"2016-08-30T15:47:03","slug":"slightest-change-to-functionphp-causes-error","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/slightest-change-to-functionphp-causes-error\/","title":{"rendered":"Slightest change to function.php causes error"},"content":{"rendered":"<p>I&#8217;m using a code to make a ratings plugin appear in my custom taxonomy. <\/p>\n<pre><code>if ( $terms ) {\n\t\t\tforeach ( $terms as $term ) {\n\n\t\t\t\tif ( in_array( $term-&gt;name, array( &#039;Services&#039;, &#039;Book Designing&#039;, &#039;Coaching and Consulting&#039;,\n\t\t\t\t\t\t&#039;Copywriting&#039;, &#039;Critiquing&#039;, &#039;Editing&#039;, &#039;Freelance Writing&#039;, &#039;Literary Agent&#039;,\n\t\t\t\t\t\t&#039;Marketing and Promoting&#039;, &#039;Proofreading&#039;, &#039;Publishing&#039; ) ) ) {\n\t\t\t\t\t$found = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}<\/code><\/pre>\n<p>It should appear in all the categories listed here, but I noticed that instead of &#8220;Literary Agents,&#8221; the plugin developer wrote &#8220;Literary Agent,&#8221; and so the ratings don&#8217;t show in that category. I simply added an &#8220;s&#8221; to the end, and I get this error on the front end:<\/p>\n<p>Warning: Cannot modify header information &#8211; 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<\/p>\n<p>It doesn&#8217;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&#8217;d really appreciate some help. Thanks!<\/p>\n","protected":false},"template":"","class_list":["post-6331918","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6331918","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6331918\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=6331918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}