Hello.
I looked up in the documentation how to copy the attendee_list.php into the templates folder.
I followed these instructions and when I upload the modified attendee_list.php file to the other folder (espresso > templates) it makes my theme break. The site loads a white page. The dashboard loads a white page.
I delete the file, and everything works.
I restore the file, and everything breaks.
I really want to show the attendee name, email address and organization. It shouldn’t be this hard!
I will copy the contents of my php file:
<?php
//List Attendees Template
//Show a list of attendees using a shortcode
//[LISTATTENDEES]
//[LISTATTENDEES limit="30"]
//[LISTATTENDEES show_expired="false"]
//[LISTATTENDEES show_deleted="false"]
//[LISTATTENDEES show_secondary="false"]
//[LISTATTENDEES show_gravatar="true"]
//[LISTATTENDEES paid_only="true"]
//[LISTATTENDEES show_recurrence="false"]
//[LISTATTENDEES event_identifier="your_event_identifier"]
//[LISTATTENDEES category_identifier="your_category_identifier"]
//Please refer to this page for an updated lsit of shortcodes: https://eventespresso.com/forums/?p=592
//The following code displays your list of attendees.
//The processing for this function is managed in the shortcodes.php file.
if (!function_exists('event_espresso_show_attendess')) {
function event_espresso_show_attendess($sql,$show_gravatar,$paid_only, $sort=''){
//echo $sql;
global $wpdb,$this_is_a_reg_page;
$events = $wpdb->get_results($sql);
foreach ($events as $event){
$event_id = $event->id;
$event_name = stripslashes_deep($event->event_name);
if (!$this_is_a_reg_page){
$event_desc = do_shortcode(stripslashes_deep($event->event_desc));
}
//This variable is only available using the espresso_event_status function which is loacted in the Custom Files Addon (https://eventespresso.com/download/plugins-and-addons/custom-files-addon/)
$event_status = function_exists('espresso_event_status') ? ' - ' . espresso_event_status($event_id) : '';
//Example usage in the event title:
/*<h2><?php _e('Attendee Listing For: ','event_espresso'); ?><?php echo $event_name . ' - ' . $event_status?> </h2>*/
?>
//These are example variables to show answers to questions
$custom_question_1 = '<br />'.do_shortcode('[EE_ANSWER q="11" a="'.$id.'"]');
$custom_question_2 = '<br />'.do_shortcode('[EE_ANSWER q="3" a="'.$id.'"]');
Please help me figure out the correct php or css to display three pieces of information (first name last name, custom question 1 and custom question 2) on the page in a row.
The shortcode [EE_ANSWER q=”3″ a=”‘.$id.'”] is calling the attendees email. This is required information for all attendees as part of the core and as such can be displayed within attendee_list.php by echoing just $email. (one less database call which is always good)
The code posted includes the gravatar which is fine to leave in but if you want the gravatar to display you need to use [LISTATTENDEES show_gravatar=”true”] if not ignore this comment.
Here is a copy of the code I used to display the information requested. I am unsure of what question 11 is (custom q 1) so have left that as is but this should work for the information you need. It has no styling information currently and is all included within a single p tag so you’ll need to add which ever tags you need.
The information is there, but also some code is showing.
Here’s what is in my php file:
//These are example variables to show answers to questions
$custom_question_1 = '<br />'.do_shortcode('[EE_ANSWER q="11" a="'.$id.'"]');
$custom_question_2 = '<br />'.do_shortcode('[EE_ANSWER q="3" a="'.$id.'"]');
The support post ‘attendee details with questions: modifying attendee_list.php breaks site’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.