Support

Home Forums Event Espresso Premium Adding photo to custom ticket – EE3

Adding photo to custom ticket – EE3

Posted: May 25, 2016 at 2:51 am

Viewing 9 reply threads


Chi Bear

May 25, 2016 at 2:51 am

I’d like to add an avatar not gravatar to my custom ticket designs. Is this possible? If so how?


Tony

  • Support Staff

May 25, 2016 at 5:02 am

Hi there,

So that I understand what you are trying to achieve better, could you provide some details of where would the avatar image be hosted?


Chi Bear

May 25, 2016 at 6:35 am

The avatar is a wordpress hosted image on our server. It is the imag the member uploads from their drive using the upload feature.


Chi Bear

May 25, 2016 at 6:40 am

Hust to be extra specific: we’re hoping to use the personal avatar of a registered member to input on a custom ticket design. Is here a shortcode or tag we can implement?


Josh

  • Support Staff

May 25, 2016 at 8:45 am

Do you have the PHP code needed to pull that image from the user account? I imagine that you have a plugin or something that adds the image upload feature to the user profile page. If that’s the case, you can check the documentation for the code to get that image. Once you have that code, you can add the PHP to the EE3 ticket template. You copy your custom ticket template to
wp-content/uploads/espresso/tickets/templates/

and EE3 will load the custom ticket template from there.


Chi Bear

May 31, 2016 at 6:47 pm

Is there a particular wordpress plugin you could recommend that can offer this? I’m sure someone else has asked for this type of modification before. Any help in that direction would be appreciated.


Josh

  • Support Staff

June 1, 2016 at 8:24 am

It sounds like you already have a plugin that adds the image upload feature to the Member profile page. Is that the case? If so, what’s the plugin’s name?


Chi Bear

June 1, 2016 at 10:27 am

Hi Josh,

We’re using WP User Avatar. I’ve tried to utilize the php code but have only been successful in having the default avatar display on the ticket.

Thanks in Advance


Josh

  • Support Staff

June 1, 2016 at 12:13 pm

Chi Bear,

You’ll find this in the ticket template code:

<td width="22%" align="right" valign="top"><div class="gravatar">[gravatar]</div></td>

You can change where it has [gravatar] short code to use the get_avatar() WordPress function and it will use your custom Avatar instead:

<td width="22%" align="right" valign="top"><div class="gravatar">
  <?php echo get_avatar( $data->attendee->email ); ?> </div></td>


Chi Bear

June 1, 2016 at 2:40 pm

Josh,

Thanks so much!!! that did the trick… 🙂

Viewing 9 reply threads

The support post ‘Adding photo to custom ticket – EE3’ 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