Posted: September 17, 2013 at 8:47 am
|
Is there a way to show an attendee list for just one individual event in chronological order? That would be useful for a Waitlisted event, so people could see where they stand in the order. Currently, all my lists are shown in alphabetical order, which I prefer in general, so I don’t want to change the standard approach. |
|
September 17, 2013 at 11:19 am Sure, first you have to modify line 216 of includes/shortcodes.php to be: event_espresso_attendee_list($event_id, $event_identifier, $category_identifier, $show_gravatar, $show_expired, $show_secondary, $show_deleted, $show_recurrence, $limit, $paid_only, $order_by); and line 194 to be: extract(shortcode_atts(array('event_id' => 'NULL', 'event_identifier' => 'NULL', 'category_identifier' => 'NULL', 'event_category_id' => 'NULL', 'show_gravatar' => 'NULL', 'show_expired' => 'NULL', 'show_secondary' => 'NULL', 'show_deleted' => 'NULL', 'show_recurrence' => 'NULL', 'limit' => 'NULL', 'paid_only' => 'NULL', 'order_by' => 'NULL'), $atts)); and then add a line after line 139, so that it reads: $sort = $sort_by == 'last name' ? " ORDER BY lname " : ''; $sort = $sort_by == 'date' ? " ORDER BY date " : $sort; You would then use the shortcode attribute: |
|
Thanks Sidney. I’m using 4.0 caf with some customization done by EE. All my lines seem to be different from what you’re suggesting. I found the appropriate line for 216 above, but there several possibilities for your 194 replacement. Can I email you my shortcodes.php file? There doesn’t seem to be a way to upload files in this forum. |
|
September 19, 2013 at 12:12 am HI, Please use Pastebin to display your code |
|
September 21, 2013 at 11:26 am Thanks Dean. Pastebin’s an interesting service. I’m now signed up and the code’s posted. Here it is: http://pastebin.com/43sTdpQY |
|
Instead of 216, looks like that line is now on 157. |
|
Excellenet. I had to make a few easy modifications to your suggestion to reflect some different variable names … but that did it! Many thanks. |
|
Whoops – I spoke to soon. Now it’s showing all lists in chronological order, not just the one I want (I want the others in alphabetical order), even though I’m just using the shortcode in one post. At this stage, I think I’ll just revert to alphabetical order. Thanks anyway. |
|
September 24, 2013 at 11:57 pm Thanks Harvey, I’ll mark this as closed. |
The support post ‘Listattendee Shortcode – chronological order’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.