Support

Home Forums Event Espresso Premium Creating Event_custom_view template: add event_staff

Creating Event_custom_view template: add event_staff

Posted: April 18, 2014 at 10:25 am

Viewing 2 reply threads


Clair Mason

April 18, 2014 at 10:25 am

Hello,

I am looking to add the event staff to a custom view template and can’t seem to get anything to show up. I more or less took the events-table template and replaced the Venue information <td id="venue_title-<?php echo $event->id?>" class="venue_title"><?php echo $event->venue_name ?></td> with the staff short-code<td id="staff_title-<?php echo $event->id?>" class="staff_title"><?php echo do_shortcode('[ESPRESSO_STAFF event_id="' . $event_id . '"]'); ?></td> However nothing shows up for the staff. Any help would be appreciated.

Thank you.


Tony

  • Support Staff

April 18, 2014 at 10:33 am

Hi Clair,

If you notice this line:

<?php echo $event->id?>" class="staff_title"><?php echo do_shortcode('[ESPRESSO_STAFF event_id="' . $event_id . '"]'); ?></td>

Notice we $event->id but then within the ESPRESSO_STAFF shortcode you are using $event_id.

The $event_id variable may not exist (likely doesn’t in this case) you can either create it and assign it the event ID, such as:

$event_id = $event->id, then use that.

Or simply use $event->id in its place. So:

<?php echo $event->id?>" class="staff_title"><?php echo do_shortcode('[ESPRESSO_STAFF event_id="' . $event->id . '"]'); ?></td>

Does that help?


Clair Mason

April 18, 2014 at 10:44 am

Thank you Tony. Sorry I missed that. Worked like a charm

Viewing 2 reply threads

The support post ‘Creating Event_custom_view template: add event_staff’ 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