From 6a9187e619711b30595b89ac2d6c31f5f71530c6 Mon Sep 17 00:00:00 2001 From: Markus Ankenbrand Date: Mon, 12 Sep 2016 21:28:43 +0200 Subject: [PATCH] Fix query with nested array --- functions.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/functions.php b/functions.php index 99519a9..e0e2990 100644 --- a/functions.php +++ b/functions.php @@ -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' + ) ) ); } }