Title: Sorting posts by parent/child fields?
Last modified: August 30, 2016

---

# Sorting posts by parent/child fields?

 *  [grabbagmedia](https://wordpress.org/support/users/grabbagmedia/)
 * (@grabbagmedia)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/sorting-posts-by-parentchild-fields/)
 * This is a long shot, but somebody out there might have an idea on this.
 * I have setup a site with several custom post types with parent/child relationships
   among them. When I query a list of one of these post types, it’s pretty easy 
   to get the IDs of the parents and children to display any attachments or fields
   associated with those parents and children as well. But I’m wondering if anybody
   knows of a way to sort the list by a field from a parent or child rather than
   just the fields associated with the post type I’m querying?

The topic ‘Sorting posts by parent/child fields?’ is closed to new replies.

## Tags

 * [child](https://wordpress.org/support/topic-tag/child/)
 * [parent](https://wordpress.org/support/topic-tag/parent/)
 * [query](https://wordpress.org/support/topic-tag/query/)
 * [relationships](https://wordpress.org/support/topic-tag/relationships/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [grabbagmedia](https://wordpress.org/support/users/grabbagmedia/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/sorting-posts-by-parentchild-fields/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
