Warning: Parameter 1 to ace_where() expected to be a reference – Advance Category Excluder

You just upgraded your WordPress site, or better yet, your server got upgraded to PHP 5.3 and you’re seeing the following errors

Warning: Parameter 1 to ace_where() expected to be a reference, value given in /var/www/vhosts/YOURDOMAIN.com/httpdocs/wp-includes/plugin.php on line 227

Warning: Parameter 1 to ace_join() expected to be a reference, value given in /var/www/vhosts/YOURDOMAIN.com/httpdocs/wp-includes/plugin.php on line 227

 

There’s a couple solutions.

First, deactivate the “Advanced Category Excluder” plug-in so your site works.

If you know how to code with PHP edit your theme following these instructions to exclude categories http://codex.wordpress.org/Custom_Queries#Category_Exclusion

add_action('pre_get_posts', 'gloss_remove_glossary_cat' );

function gloss_remove_glossary_cat( $wp_query ) {
	global $gloss_category;  

	// Figure out if we need to exclude glossary - exclude from
	// archives (except category archives), feeds, and home page
	if( is_home() || is_feed() || ( is_archive() && !is_category() )) {
		set_query_var('cat', '-' . $gloss_category);
		//which is merely the more elegant way to write:
		//$wp_query->set('cat', '-' . $gloss_category);
	}
}

Or, use another pre-built Category Exluding plug-in like this one, Ultimate Category Excluder

Leave a Reply

Your email address will not be published. Required fields are marked *