From 51b87dd6bba565cc56d2e75bfe0f8c99d83f287b Mon Sep 17 00:00:00 2001 From: Markus Ankenbrand Date: Mon, 12 Sep 2016 12:35:03 +0200 Subject: [PATCH] Show Urlaub for Tour --- functions.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/functions.php b/functions.php index 5880961..7a9d095 100644 --- a/functions.php +++ b/functions.php @@ -37,11 +37,18 @@ function atravelblog_related_posts() { } endwhile; endif; - echo('
'); - echo(' '); - wp_reset_query(); } elseif($cat == 'Tour') { - var_dump(get_field('urlaub')); + $urlaub = new WP_Query(array('id' => get_field('urlaub')[0])); + if ($urlaub->have_posts()) : + while ( $urlaub->have_posts() ) : $urlaub->the_post(); + global $post; + if($thisID == get_field('urlaub')[0]){ + get_template_part( 'content', get_post_format() ); + } + endwhile; + endif; } - + echo('
'); + echo(' '); + wp_reset_query(); } \ No newline at end of file