'); global $post; $thisID = get_the_ID(); if ( get_the_category()[0]->name == 'Urlaub' ){ $tagebuch = new WP_Query( array( 'category_name' => 'Tagebuch' ) ); if ($tagebuch->have_posts()) : while ( $tagebuch->have_posts() ) : $tagebuch->the_post(); global $post; if($thisID == get_field('urlaub')->ID){ get_template_part( 'content', get_post_format() ); } endwhile; endif; echo('
'); echo(' '); wp_reset_query(); } }