Output posts separated by category

Output posts separated by category – Example using a Team and Team Category


Executive Team

Jane Doe
John Smith


Tom Johnson
Angie Mark


Jill Mitchell
George Jackson


<Loop type=taxonomy_term taxonomy=team_category orderby=menu_order>
  <h2><Field title /></h2>
  <Loop type=post post_type=team_member taxonomy=team_category terms="{Field id}">
    <Field title />

Team CPT (team_member), and Team Category (team_category) – Separated sections by their categories

Note: In this case, the order of the taxonomy matters, so we will use a plugin to set menu order of team_category and use orderby=menu_order to respect that order instead of just outputting it in the default alphabetical order