diff --git a/single.php b/single.php index d29aa52..2cd1ce7 100644 --- a/single.php +++ b/single.php @@ -91,11 +91,13 @@ 'Tagebuch', - 'meta_key' => 'urlaub', // name of custom field - 'meta_value' => '"' . get_the_ID() . '"', // matches exaclty "123", not just 123. This prevents a match for "1234" + 'category_name' => 'Tagebuch' )); - var_dump($tagebuch); + foreach($tagebuch as $tb){ + if(get_field('urlaub',$tb->ID)->ID === get_the_ID()){ + get_template_part( 'content', get_post_format($tb->ID) ); + } + } ?>