Posted: September 15, 2013 at 10:25 pm
|
September 15, 2013 at 10:25 pm Hello. 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: //Please refer to this page for an updated lsit of shortcodes: http://staging.eventespresso.com/forums/?p=592 /*Example CSS for your themes style sheet: li.attendee_details{ //The following code displays your list of attendees. //This variable is only available using the espresso_event_status function which is loacted in the Custom Files Addon (http://staging.eventespresso.com/download/plugins-and-addons/custom-files-addon/) <div class="event-display-boxes ui-widget"> <h2 class="event_title ui-widget-header ui-corner-top"> <div class="event-data-display ui-widget-content ui-corner-bottom"> <?php //echo wpautop($event_desc); ?> <?php //These are example variables to show answers to questions ?> <?php </div> |
|
September 15, 2013 at 10:31 pm Ah, OK I see where I figured out to remove the open parenthesis provided in the sample code but I didn’t close them. So I fixed that and now my page is only displaying email addresses, and not names or organizations. 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. |
|
Hi Alice, A couple of alterations. 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. |
|
Very close. The information is there, but also some code is showing. Here’s what is in my php file: ?> $custom_question_1 = '<br />'.do_shortcode('[EE_ANSWER q="11" a="'.$id.'"]'); <?php </div> |
September 16, 2013 at 10:06 am You should remove the end php tag: ?> right before the code that is showing: $custom_question_1 = '<br />'.do_shortcode('[EE_ANSWER q="11" a="'.$id.'"]'); |
|
|
Thank you! FirstName LastName Thanks so much for all your help! |
This should do it <?php echo '<p>' . stripslashes_deep($fname . ' ' . $lname) . '<br />' . $email . '<br />' . $custom_question_1 . '</p>'; ?> |
|
|
Thanks for trying, but that did not do anything: |
|
I figured it out. I replaced the |
Odd, though my code was missing the break tags for some reason. Ok, see if separating them into paragraphs works <?php echo '<p>' . stripslashes_deep($fname . ' ' . $lname) . '</p><p>' . $email . '</p><p>' . $custom_question_1 . '</p>'; ?> |
|
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.