This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Compact Box Layout not loading correct sometimes

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Compact Box Layout not loading correct sometimes Reply To: Compact Box Layout not loading correct sometimes

#46054
Ernest MarcinkoErnest Marcinko
Keymaster

All right – I tried to replicate the issue a few times on different devices yesterday but I couldn’t, so I don’t know where it originated from unfortunately.

Well, for the results page you could try a custom code for that:

add_filter("asp_query_args", "asp_query_args_remove_variation", 10, 2);
function asp_query_args_remove_variation($args, $search_id) {
	if ( !$args['_ajax_search'] ) {
		$args['post_type'] = array_diff($args['post_type'], array('product_variation'));
	}
	return $args;
}

Try adding this code via the Code Snippets plugin or to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.