I want to achieve a schedule plan in my front-end. I cannot view information based on the Day. For example in the backend, a row is for Tuesday but its rendering on the column of monday in the front-end. I want it as, so entry for every day goes to its corresponding column and corresponding time. Please see the snapshots and my code below.
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<td></td>
<td>MONTAG</td>
<td>DIENSTAG</td>
<td>MITTWOCH</td>
<td>DONNERSTAG</td>
<td>FREITAG</td>
<td>SAMSTAG</td>
<td>SONNTAG</td>
</tr>
</thead>
<?php while(have_rows('tag')) :the_row(); ?>
<tr>
<td><?php echo get_sub_field('uhrzeit'); ?></td>
<td>
<?php $aufguss_object = get_sub_field('aufguss');?>
<?php $sauna_object = get_sub_field('sauna');?>
<?php if($aufguss_object) { ?>
<?php $post = $aufguss_object; ?>
<?php setup_postdata( $post ); ?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></br>
<?php wp_reset_postdata(); ?>
<?php } ?>
<?php if($sauna_object) { ?>
<?php $post = $sauna_object; ?>
<?php setup_postdata( $post ); ?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></br>
<?php wp_reset_postdata(); ?>
<?php } ?>
</td>
</tr>
<?php endwhile; ?>