• Resolved iivvvii

    (@iivvvii)


    This is my code:

    $zoekQuery = array('post_type' => 'spots',
    	'post_status' => 'publish',
    	'posts_per_page' => 15,
    	'orderby' => 'title',
    	'order' => 'ASC',
    	'paged' => $paged,
    	's' => $dzoekterm,
    	'tax_query' => array(
    		'relation' => 'AND',
    		$eactiviteiten,
    		$eprovincies,
    		$esferen,
    		$eomgevingen,
    		$ebudgetten,
    		$efaciliteiten
    	)
    $wp_query->query($zoekQuery);

    Unfortanatly this doesn’t give any results. If I turn relevanssi plugin off this code is working fine. When I remove the tax_query part it is also working fine.

    If also tried to rebuild to code to setting $wp_query->query_vars and relevanssi_do_query($wp_query);. But this gives the same result.

    I hope somebody can help, thanks in advance.

    http://wordpress.org/extend/plugins/relevanssi/

Viewing 1 replies (of 1 total)
  • Thread Starter iivvvii

    (@iivvvii)

    alright eventually it was quite easy to fix, so for anyone facing the same problem:

    Some of the array’s stored in the vars $eactiviteiten until $efaciliteiten could be empty in certain cases. Apparently the default wordpress search doesn’t care about that. But relevanssi had some SQL errors when some of those vars are empty. Now i checke the vars and only add them to the tax_query wen the array is not empty.

Viewing 1 replies (of 1 total)

The topic ‘Problem with taxonomy’ is closed to new replies.