Fix query with nested array

This commit is contained in:
Markus Ankenbrand 2016-09-12 21:28:43 +02:00
parent 3e7dee4ca6
commit 6a9187e619

View file

@ -26,9 +26,11 @@ function my_home_category( $query ) {
$query->set( 'cat', '2');
if ( !empty( $_GET['person'] ) ) {
$query->set( 'meta_query', array(
'key' => 'mitreisende',
'value' => $_GET['person'],
'compare' => 'LIKE'
array(
'key' => 'mitreisende',
'value' => $_GET['person'],
'compare' => 'LIKE'
)
) );
}
}