an
groups-icon

Any changes to functions.php causes errors

Wait a minute... This content is very very old. We no longer sell or support this theme version. New Topics
  • Version 9
    0 points
    Beginner

    I’m using a code to make a ratings plugin appear in my custom taxonomy.
    [code title=”functions.php”]
    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;
    }[/code]
    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!

    July 17, 2015 at 6:44 am
  • Mark Fail
    11,845 points
    Platinum User
    Bronze User Silver User Gold User Platinum User Helpful Award Fast Responder Thank You Coffee Villian Award Video Testimonial
    Members Only Content

    This reply is for PremiumPress customers only.

    Login Now
    July 17, 2015 at 6:48 am
  • 0 points
    Beginner
    Members Only Content

    This reply is for PremiumPress customers only.

    Login Now
    July 17, 2015 at 6:56 am
  • Mark Fail
    11,845 points
    Platinum User
    Bronze User Silver User Gold User Platinum User Helpful Award Fast Responder Thank You Coffee Villian Award Video Testimonial
    Members Only Content

    This reply is for PremiumPress customers only.

    Login Now
    July 17, 2015 at 2:56 pm
  • 0 points
    Beginner
    Members Only Content

    This reply is for PremiumPress customers only.

    Login Now
    July 17, 2015 at 3:21 pm
  • 0 points
    Beginner
    Members Only Content

    This reply is for PremiumPress customers only.

    Login Now
    July 27, 2015 at 9:13 am
  • Josh njenga
    -13 points
    Beginner
    Members Only Content

    This reply is for PremiumPress customers only.

    Login Now
    July 27, 2015 at 1:12 pm

611

Views

6

Replies