Error messages when adding code to function.php or trying to delete inactive plugin files

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');

Leave a Comment