• Resolved memtee

    (@memtee)


    In order to replicate an organisational chart, we have set an admin field with delegation levels 1-5. In the shortcode, we filter results by division. How can we order by (a) delegation in descending order, and then (b) alphabetically in ascending order? Something like:
    [pdb_list orderby="delegation" order="desc" orderby="first_name" order="asc"]

    https://ww.wp.xz.cn/plugins/participants-database/

Viewing 1 replies (of 1 total)
  • Thread Starter memtee

    (@memtee)

    Marked this as resolved. Found the answer here:

    In your shortcode you can now do something like this:

    [pdb_list orderby=”last_name,first_name”]

    You can also determine the “direction” of the sort on more than one field:

    [pdb_list orderby=”date_recorded,last_name” order=”desc,asc”]

    That will sort by date in descending order, and then by last name in ascending order.

    You can have as many fields in the sort as you want, and they get sorted in the order given. The default sort order is ascending.

Viewing 1 replies (of 1 total)

The topic ‘Orderby for multiple fields’ is closed to new replies.