Support

Home Forums Event Espresso Premium Display Staff List inside Box?

Display Staff List inside Box?

Posted: January 18, 2013 at 2:43 pm


Sean Collishaw

January 18, 2013 at 2:43 pm

Hi EE Folk… me again. πŸ™‚ This time I have a question I’m sure can be solved with some CSS, but I can’t quite get there. On our event registration page, which I’ve pared down to only feature date / time, staff, attendees, and registration, I’d like to have the Event Staff (or “hosts”) display inside a nice box like the Attendee List is currently doing. What do I do to get that to work?
Also, is there any code you can think of that will display a message on the Registration page if the event has no staff yet? For instance, if there are no staff assigned to the event, rather than show nothing, show a note “There Are No Hosts For This Event At This Time.” Thoughts on that one?
As always, thanks so much for your time and all you do!


Dean

January 20, 2013 at 11:41 pm

Hi Mike,

You would need to edit the event_list_display.php file

I would do something like this, to check to see if the event has a staff attached to it and if not display a message and if so to display the staff details.

<?php

$staffname = $event->staff_name;
if ($staffname == '') {
    echo "Sorry no staff member";
} else {
    echo do_shortcode('[ESPRESSO_STAFF event_id="' . $event->id . '"]');
}

?>


Sean Collishaw

January 21, 2013 at 7:46 am

Hi Dean… I also meant to add the code to show what I already have changed in the registration_page_display.php code.

        <strong></strong>





&lt;?php
}

Do I still want to add the code you suggested into event_list_display.php, or can I add that into this custom code?

Also, how do I get the Event Staff to show in a box / section like the attendees list is doing. For example, check out: Attendee Box Sample
Ideally, we would have a box around the Staff section with a heading like “Your Event Hosts for EVENT NAME”Thanks in advance for your help!!


Sean Collishaw

January 21, 2013 at 7:48 am

let me try that code insert again. it never works right for me. πŸ™

<strong>

</strong>





&lt;?php
}


Sean Collishaw

January 21, 2013 at 7:49 am

Pasted: http://justpaste.it/1tpp


Dean

January 22, 2013 at 4:23 am

Hi Mike,

YEs it is better to use a service like justpaste or pastebin, the forums are erratic for non admins when it come to code.

Regarding the code, I changed it slightly to work in the registration_page_display.php and i just used the code that goeas around the events to add the box

<h3 class="event_title ui-widget-header ui-corner-top" id="event_title-<?php echo $event_id; ?>">
Staff
</h3>

<div class="event_espresso_form_wrapper event-data-display ui-widget-content <?php echo $ui_corner ?>">

<?php

$staffname =  do_shortcode('[ESPRESSO_STAFF event_id="' . $data->event->id . '"]');

if ($staffname == '') {
    echo "Sorry no staff member";
} else {
    echo do_shortcode('[ESPRESSO_STAFF event_id="' . $data->event->id . '"]');
}

?>

</div>


Sean Collishaw

January 22, 2013 at 1:46 pm

Awesome, that did it!! Thanks so much, Dean!

The support post ‘Display Staff List inside Box?’ 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.

Event Espresso