Posted: March 2, 2021 at 9:16 pm
My EE4 works great. I now want to show the total number of attendees per event. I can see them in the WordPress Dashboard but how do I display them in a post? |
|
I only want the approved registrations. I tried the code I found and this does not return the correct number: add_shortcode(‘EVENT_ATTENDEE_NUMBER’,’fun_display_attendee_number’); |
|
I then used the shortcode: [EVENT_ATTENDEE_NUMBER event_id=2723] That event has a different number than the actual registered attendees… |
|
Hi there, Just to note, if you are using code from the forums, it’s best to include a link to the forum post so we have some additional context on that code. So it looks like it’s the code shared by WisdmLabs here: https://eventespresso.com/topic/show-number-of-people-registered-on-an-events-page/#post-175221 Which doesn’t include any specific registration status so would include ALL registrations on that event. The problem with what you are looking to do is people set up the events in different ways which then changes how the values need to be pulled in. Here is an example that pulls in all registrations across the tickets assigned to the ‘next’ upcoming datetime for an event: https://gist.github.com/Pebblo/f89e3a7076acde7e7998 Is that what you are looking for? |
|
All I want is for this to count the number of approved attendees. Similar to the shortcode [ESPRESSO_EVENT_ATTENDEES event_id=3510] except it provides a count of the attendees instead of listing their names. |
|
Uses EE_Contacts linked to the registration on an event. For example, if you have 10 registrations all linked to the contact (same First Name, Last Name & Email Address), the above shortcode would should 1 attendee. How many datetimes in your event? How many tickets on those datetimes? |
|
The support post ‘How to show the total number of attendees for an event’ 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.