From fdfdfcb135f8c2448ac5802e13b237568bb1b1ef Mon Sep 17 00:00:00 2001 From: Markus Ankenbrand Date: Mon, 12 Sep 2016 12:59:53 +0200 Subject: [PATCH] Get all results for the query --- functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index cfe4451..b03e295 100644 --- a/functions.php +++ b/functions.php @@ -27,7 +27,10 @@ function atravelblog_related_posts() { $thisID = get_the_ID(); $cat = get_the_category()[0]->name; if ( $cat == 'Urlaub' ){ - $tagebuch = new WP_Query( array( 'category_name' => 'Tagebuch' ) ); + $tagebuch = new WP_Query( array( + 'category_name' => 'Tagebuch', + 'posts_per_page' => -1 + ) ); if ($tagebuch->have_posts()) : echo('