So I am looking to recreate this table structure that I had done manually:
https://dl.dropboxusercontent.com/u/7649890/UCF/before-grouping.png
All of my custom posts here are connected to a taxonomy (program) where I can select 1 of 3 options (Grad, Undergrad, or Undergrad & Grad). I would like to be able to group all posts together by program level like I had done before…
Here is a visual of my current status:
https://dl.dropboxusercontent.com/u/7649890/UCF/new-attempt.png
And here is my code thus far:
<div id="tableTextLeft">
<table width="100%">
<thead>
<tr>
<th>Academics</th>
<th>Charge</th>
<th>Members</th>
</tr>
</thead>
<tbody>
<?php if ( have_posts() ) while ( have_posts() ) : the_post();?>
<?php
$term = get_field('program');
if( $term ): ?>
<tr>
<td colspan="3">
<h2 class="mk-shortcode mk-fancy-title fancy-title-align-left simple-style " style="font-size: 14px; text-align: left; color: #3d3d3d; font-style: inherit; font-weight: bold; padding-top: 0px; padding-bottom: 0px; text-transform: initial; letter-spacing: 0px; margin-bottom: 0px;"><?php echo $term->name; ?></h2>
</td>
</tr>
<?php endif; ?>
<tr>
<td><a title="<?php the_title(); ?>" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></td>
<td><?php the_field('charge'); ?></td>
<td><?php the_field('member_type'); ?></td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
</div>
Any ideas on how to automatically group, and sort the committees by name would be much appreciated.
Thanks