Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Error message below:

Warning: Cannot modify header information - headers already sent by (output started at /home/content/79/7603579/html/listings/wp-content/themes/OIB theme/functions.php:519) in /home/content/79/7603579/html/listings/wp-includes/pluggable.php on line 897

EDIT: Code around functions.php line 519:

    <small><?php echo $value['desc']; ?></small>
    <div class="clearfix"></div>
    </div> 
    <?php break; 
case "section":
    $i++; ?>
    <div class="rm_section">
       <div class="rm_title">
         <h3><img src="<?php bloginfo('template_directory')?>/functions/images/trans.gif" class="inactive" alt="""><?php echo $value['name']; ?></h3>
         <span class="submit">
            <input name="save<?php echo $i; ?>" type="submit" value="Save changes" />
         </span>
         <div class="clearfix"></div>
      </div>
      <div class="rm_options">
    <?php break;
   } 
} ?>

And the fix, per comment below, removed this code:

function cpt_Search_category_Filter($query) {
   $post_type = array('post','business_sold');
   if ($query->is_search || $query->is_category) {
      $query->set('post_type', $post_type);
   };
      return $query;
};
add_filter('pre_get_posts','cpt_Search_category_Filter');
share|improve this question
    
Can you show the code around line 519 of your functions.php? –  Geert May 12 '11 at 14:46
add comment

1 Answer 1

up vote 1 down vote accepted

Your functions.php file is outputting instead of returning something, on line 519.

Can you post whatever code/functions are around Line 519?

EDIT:

You have a syntax error in your cpt_Search_category_Filter() function. You have a couple stray semi-colons after closing braces.

Change this:

function cpt_Search_category_Filter($query) {
   $post_type = array('post','business_sold');
   if ($query->is_search || $query->is_category) {
      $query->set('post_type', $post_type);
   };
      return $query;
};
add_filter('pre_get_posts','cpt_Search_category_Filter');

to this:

function cpt_Search_category_Filter($query) {
   $post_type = array('post','business_sold');
   if ($query->is_search || $query->is_category) {
      $query->set('post_type', $post_type);
   }
      return $query;
}
add_filter('pre_get_posts','cpt_Search_category_Filter');
share|improve this answer
    
Hello! Now it's apparently causing login errors as well - here is the code around line 531: –  mktggirl May 12 '11 at 17:02
    
<small><?php echo $value['desc']; ?></small><div class="clearfix"></div> </div> <?php break; case "section": $i++; ?> <div class="rm_section"> <div class="rm_title"><h3><img src="<?php bloginfo('template_directory')?>/functions/images/trans.gif" class="inactive" alt="""><?php echo $value['name']; ?></h3><span class="submit"><input name="save<?php echo $i; ?>" type="submit" value="Save changes" /> </span><div class="clearfix"></div></div> <div class="rm_options"> <?php break; } } ?> –  mktggirl May 12 '11 at 17:03
    
I apologize - the code I posted isn't formatted. I'm still scrambling to find a way to reasonably post code here. I'll keep working on it. I so appreciate your effort to help me. –  mktggirl May 12 '11 at 17:39
    
Hello again~ This following fix added to function.php is apparently what was causing the error in function.php. I removed so now the system is not recognizing the assignment of the inherent/default (per plugin Custom Post UI) taxonomony of 'categories' (and tags) to my custom post type. The plugin does not assign. function cpt_Search_category_Filter($query) { $post_type = array('post','business_sold'); if ($query->is_search || $query->is_category) { $query->set('post_type', $post_type); }; return $query;};add_filter('pre_get_posts','cpt_Search_category_Filter'); –  mktggirl May 12 '11 at 19:58
    
The best approach would probably be to edit your original question, and post the code there. :) –  Chip Bennett May 12 '11 at 20:11
show 3 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.