Fix query with nested array
This commit is contained in:
parent
3e7dee4ca6
commit
6a9187e619
1 changed files with 5 additions and 3 deletions
|
|
@ -26,9 +26,11 @@ function my_home_category( $query ) {
|
||||||
$query->set( 'cat', '2');
|
$query->set( 'cat', '2');
|
||||||
if ( !empty( $_GET['person'] ) ) {
|
if ( !empty( $_GET['person'] ) ) {
|
||||||
$query->set( 'meta_query', array(
|
$query->set( 'meta_query', array(
|
||||||
|
array(
|
||||||
'key' => 'mitreisende',
|
'key' => 'mitreisende',
|
||||||
'value' => $_GET['person'],
|
'value' => $_GET['person'],
|
||||||
'compare' => 'LIKE'
|
'compare' => 'LIKE'
|
||||||
|
)
|
||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue