Show List of Attendees on Event Page

WordPress Event Management, Calendars & Registration Forums General Question Show List of Attendees on Event Page

This topic contains 4 replies, has 3 voices, and was last updated by  Stephen Harris 2 years, 3 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #26755

    Hi Stephen!

    Is it possible to show a list of people who have RSVPed for an event on the single event page?

    I’d like to pull the attending user’s display name, and possibly their email address.

    Thanks for your time!

    Lorie

    Lorie Travis
    #26776

    Hi Lorie,

    Yes, but I’m assuming that you are selling ‘by series’? Otherwise you will need to get the occurrence ID of the particular date you are after (even if there is only one date!).

    You can get a list of occurrence date(s), indexed by occurrence ID via: eo_get_the_occurrences()http://codex.wp-event-organiser.com/function-eo_get_the_occurrences_of.html

    Then to get a list of bookings:

    $bookings = eo_get_bookings( array(
        'status'=>'confirmed',
        'event_id' => get_the_ID(),
        'occurrence_id' => $occurrence_id, //ignore this if selling by date
     ) );
    

    You can display a list using the example on this page: http://codex.wp-event-organiser.com/function-eo_get_bookings.html

    The code for getting and displaying the bookings can all go in event-meta-event-single.php (or single-event.php if your theme has it).

    The example doesn’t include, but any user-provided data should be wrapped in esc_html() e.g:

    esc_html( eo_get_booking_meta( $booking->ID, 'bookee_display_name' ) )
    

    rather than just

    eo_get_booking_meta( $booking->ID, 'bookee_display_name' )
    

    if it is to be printed to the page.

    Stephen Harris
    #41563

    Hey Stephen
    Thanks a lot, that works very well!
    Is it possible to show the list of attendees between the event description and the booking form? I can’t seem to do that in single-event.php nor event-meta-event-single.php.

    Thanks!

    Oliver Flueckiger
    #41691

    @stephen
    do you still maintain this plugin and offer support? I paid for support…

    Oliver Flueckiger
    #41698

    Hi Oliver,

    Sorry, I missed your initial reply. The plug-in by default will insert the form using the post_content filter, so its actually part of the event description.

    You can disable that with the following code:

    add_filter( 'eventorganiser_pro_get_option_disable_automatic_form', '__return_true' );
    

    added to the theme’s functions.php. You’ll then need to render the booking form in the template, where you want the booking form to appear:

    echo eo_get_booking_form( get_the_ID() );
    
    Stephen Harris
Viewing 5 posts - 1 through 5 (of 5 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.