Title: Group by option
Last modified: August 21, 2016

---

# Group by option

 *  Resolved [donal](https://wordpress.org/support/users/donal/)
 * (@donal)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/group-by-option/)
 * I just started using your plugin which is very easy to set up and use so thanks.
 * My query about being able to group data using a hidden field. My data has repeating
   data (not great for a table but I can only use a single table here it seems).
   It would be nice to have a group by option for that repeating data. In my case
   it’s race results so I’d like to group by race. The output would then look something
   like
 * **RaceName1**
    1 Name1 Time1 .. 2 Name2 Time2 .. … **RaceName2** 1 Name1 Time1..
   2 Name2 Time2 .. … **RaceName3** ….
 * Would look much nicer than repeating data and allow the data to fit better on
   the screen.
 * I have tried other plugins but this is certainly the most intuitive and easiest
   to use.
 * Is this something you are likely to do?
 * [http://wordpress.org/plugins/participants-database/](http://wordpress.org/plugins/participants-database/)

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

 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/group-by-option/#post-4297936)
 * No, but mainly because there is at least two ways to do this. You can try putting
   multiple [pdb_list] shortcodes on your page; one for each race…just use the “
   filter” attribute so that each one only shows the one race. List pagination and
   search won’t work, but it looks like you don’t need that.
 * A better, but certainly more challenging way to do this would be to create a 
   custom template that groups the output into separate lists. The advantage there
   is the number of races you are showing can change, instead of being a fixed series.
   Definitely would require some coding, though.
 *  Thread Starter [donal](https://wordpress.org/support/users/donal/)
 * (@donal)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/group-by-option/#post-4297995)
 * Thanks for the considered response. I do need the ability to search on all results
   so I won’t go down the multiple shortcodes route. I also want users to be able
   to sort by a number of fields so I’ll just have to live with repeating data instead
   of possibly having title fields for different data e.g. to sort by time for races
   of a certain distance my proposed grouping would actually have
 * Race3
    1 Name1 Time1 Race1 1 Name1 Time1 Race2 1 Name1 Time1
 * Instead of just
 * Race3 1 Name1 Time1
    Race1 1 Name1 Time1 Race2 1 Name1 Time1
 * Two small things I’ve been looking in the support posts about:
    1. Can you just
   search on all searchable fields rather than having to pick a field from the drop-
   down? 2. In the Sort By function, can you default to Ascending or Descending?
 * Thanks for the great plugin.
 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/group-by-option/#post-4298012)
 * It’s currently not possible to search in multiple fields at once, I haven’t even
   looked into it so I’ve got no hints on how it might be possible.
 * The sort by function will default to whatever setting you have in the “order”
   attribute in the shortcode.

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

The topic ‘Group by option’ 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/)

## Tags

 * [group by](https://wordpress.org/support/topic-tag/group-by/)
 * [request](https://wordpress.org/support/topic-tag/request/)

 * 3 replies
 * 2 participants
 * Last reply from: [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/group-by-option/#post-4298012)
 * Status: resolved