Group posts by custom field
You’re close. You have: foreach (get_child_pages(wp_get_post_parent_id(get_the_ID())) as $s) { echo ‘<li><a href=”‘ . get_the_permalink($s->ID) . ‘”>’ . get_the_title($s->ID) . ‘</a></li>’; } We need to add a layer above that to show the two lists. However we can’t assume that the posts of one type will all come out together (i.e. all of one category, then … Read more