Title: Own sorting relationship fields
Last modified: October 7, 2024

---

# Own sorting relationship fields

 *  Resolved [wilbert schaapman](https://wordpress.org/support/users/wilbertschaapmancom/)
 * (@wilbertschaapmancom)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/own-sorting-relationship-fields/)
 * I have created a pod called ‘Projecten’ and a pod called ‘Medewerkers.’ They 
   are related, so in ‘Projecten,’ I can select which ‘Medewerkers’ are involved.
   Currently, the list of ‘Medewerkers’ is sorted in descending order by title. 
   However, I would like to choose a custom order for displaying them in the project
   list. How can I set my own selection and sorting order
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fown-sorting-relationship-fields%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [pdclark](https://wordpress.org/support/users/pdclark/)
 * (@pdclark)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/own-sorting-relationship-fields/#post-18059304)
 * In the relationship field under the `Relationship Options` tab, see the `Custom
   ORDER BY` option, which takes a MySQL ORDER BY query.
 * By time, present to past:
 *     ```wp-block-code
       CAST( t.post_date as DATETIME ) DESC
       ```
   
 * For a custom order, lowest to highest:
 *     ```wp-block-code
       t.menu_order ASC
       ```
   
 * Menu Order can be enabled as a number when editing the pod under `Advanced Options`
   tab > `Supports` > `Page Attributes`, or using drag-and-drop on the post listing
   screen with [Simple Custom Post Order](https://wordpress.org/plugins/simple-custom-post-order/).
 *  Thread Starter [wilbert schaapman](https://wordpress.org/support/users/wilbertschaapmancom/)
 * (@wilbertschaapmancom)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/own-sorting-relationship-fields/#post-18059973)
 * Thank you for your help. When I enter a value in the custom order by field called‘
   achternaam’ for ordering, it’s not working. I’ve set the order to `t.achternaam
   ASC`, but it doesn’t seem to have any effect, only i cannot select any medewerker
   anymore

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Own sorting relationship fields’ is closed to new replies.

 * ![](https://ps.w.org/pods/assets/icon.svg?rev=3286397)
 * [Pods - Custom Content Types and Fields](https://wordpress.org/plugins/pods/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pods/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pods/)
 * [Active Topics](https://wordpress.org/support/plugin/pods/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pods/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pods/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [wilbert schaapman](https://wordpress.org/support/users/wilbertschaapmancom/)
 * Last activity: [1 year, 8 months ago](https://wordpress.org/support/topic/own-sorting-relationship-fields/#post-18059973)
 * Status: resolved