From 0db26858108ac72cddf33044d1c4517dd52d2258 Mon Sep 17 00:00:00 2001 From: Markus Ankenbrand Date: Mon, 12 Sep 2016 21:05:04 +0200 Subject: [PATCH] Fix query for Urlaub --- functions.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/functions.php b/functions.php index 050050e..b34ebc6 100644 --- a/functions.php +++ b/functions.php @@ -48,8 +48,8 @@ function atravelblog_related_posts() { 'meta_query' => array( array( 'key' => 'urlaub', // name of custom field - 'value' => get_the_ID(), // matches exaclty "123", not just 123. This prevents a match for "1234" - 'compare' => '=' + 'value' => '"'.get_the_ID().'"', // matches exaclty "123", not just 123. This prevents a match for "1234" + 'compare' => 'LIKE' ) ) ) ); @@ -70,8 +70,8 @@ function atravelblog_related_posts() { 'meta_query' => array( array( 'key' => 'urlaub', // name of custom field - 'value' => get_the_ID(), // matches exaclty "123", not just 123. This prevents a match for "1234" - 'compare' => '=' + 'value' => '"'.get_the_ID().'"', // matches exaclty "123", not just 123. This prevents a match for "1234" + 'compare' => 'LIKE' ) ) ) ); @@ -92,8 +92,8 @@ function atravelblog_related_posts() { 'meta_query' => array( array( 'key' => 'urlaub', // name of custom field - 'value' => get_the_ID(), // matches exaclty "123", not just 123. This prevents a match for "1234" - 'compare' => '=' + 'value' => '"'.get_the_ID().'"', // matches exaclty "123", not just 123. This prevents a match for "1234" + 'compare' => 'LIKE' ) ) ) );