Title: Multiple sort fields?
Last modified: August 22, 2016

---

# Multiple sort fields?

 *  [tkalfaoglu](https://wordpress.org/support/users/tkalfaoglu/)
 * (@tkalfaoglu)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/multiple-sort-fields/)
 * I wanted to list people in “importance” order, then, of the people of the same
   rank, I wanted to list them alphabetically.
 * For the importance, I created a new field, named “sortorder”, and I just put 
   a number there.
    Then I use the shortcode like this: [pdb_list search=”false”
   sort=”false” template=”bootstrap” filter=’full-time=yes’ orderby=’sortorder,last_name’
 * However, the last_name is ignored and last names are not sorted at all. Any ideas
   why?
 * [https://wordpress.org/plugins/participants-database/](https://wordpress.org/plugins/participants-database/)

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

 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/multiple-sort-fields/#post-5323726)
 * The only way the second sort term is going to have any effect is if there is 
   more than one record that has the same value for the first term. If all the records
   have unique values for “sortorder” then they can’t be sorted any other way…make
   sense?
 *  Thread Starter [tkalfaoglu](https://wordpress.org/support/users/tkalfaoglu/)
 * (@tkalfaoglu)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/multiple-sort-fields/#post-5323729)
 * there are about 15 members. for 3 of them I entered a sort value. the rest are
   set to zero. however among those that are zero, it is not sorted by last name.
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/multiple-sort-fields/#post-5323786)
 * Hmmm, this works in my tests. So, no sort at all with the records that have a
   0 for the sort order, or are they partly sorted, with some out of order?

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

The topic ‘Multiple sort fields?’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Roland Barker](https://wordpress.org/support/users/xnau/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/multiple-sort-fields/#post-5323786)
 * Status: not resolved