Posted: May 6, 2014 at 10:42 am
|
Hello, I am trying to use the [ESPRESSO_STAFF] shortcode to display a staff picture on a ticket. I am using the ticket as a certificate for a course taught by an instructor. Currently, I have working shortcode in espresso-ticketing\templates\index.php that dynamically displays the student names, event names, and dates. <p>[fname] [lname]</p> I would like to add <p>[ESPRESSO_STAFF] </p> to display a picture of the instructor’s signature. In the Staff Manager of Event Espresso I have created a staff member and included an image url. I then went to Event Overview and assigned that staff member to an event by checking the staff member’s name under Event Staff/Speaker. When viewing the certificate for that event, it displays: Student Name At first, I attempted to create an if/else statement in index.php to dynamically change the signature based on the staff’s name, but I figured that [espresso_staff] should take care of that for me. How can I properly call the espresso_staff shortcode in index.php to dynamically display the staff’s picture? I read the documentation regarding the espresso_staff shortcode here: I also included <?php echo stripslashes_deep($data->event->espresso_staff) ?> in my html <title> tag in attempt to pull staff information. Using the show_image parameter did not work for me either. Will I need to add code to ee_default_event_meta in custom_functions.php to pull the staff image? |
Hi James, You can add the staff shortcode to the ticket template with the following code: <?php echo do_shortcode('[ESPRESSO_STAFF event_id="' . $data->attendee->event_id . '"]'); ?> |
|
|
Thank you Josh! I also added the following code to my style to hide the staff’s name. <pre class=”brush: css; gutter: true; first-line: 1; highlight: []; html-script: false”> |
|
<pre class=”brush: css; gutter: true; first-line: 1; highlight: []; html-script: false”>.person_name { |
The support post ‘Displaying a Staff Picture on a Ticket’ 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.