Support

Home Forums Event Espresso Premium People featured image

People featured image

Posted: August 27, 2015 at 4:29 am


Faique Fakier

August 27, 2015 at 4:29 am

Hi

How do I get the people profile image to display in the event page.

Please advise


Lorenzo Orlando Caum

  • Support Staff

August 27, 2015 at 11:46 am

Hi there Faique,

The People add-on currently includes the person’s name along with their excerpt on the single event page. Then there is a link to view their specific profile.

Are you wanting to include a profile picture on the single events page (e.g. example.com/events/my-summer-event/)?

Thanks


Lorenzo


Faique Fakier

August 28, 2015 at 8:43 am

Yes Lorenzo, how could I accomplish this.


Josh

  • Support Staff

August 31, 2015 at 9:59 am

Hi Faique,

You can display the featured image for each person assigned to an event by 1) You copy the content-espresso_events-people.php template file from the People add-on to your current WordPress theme.
2) You add the following line of code to the loop where you want the image to display:
<div><?php echo get_the_post_thumbnail( $person->ID(), 'full' ); ?></div>

Notes: If you want to display another size image, for example the thumbnail size, you change where it says ‘full’ to ‘thumbnail’.
There are two loops in the template, you’ll add the code to the loop that starts with <?php foreach ( $persons as $person ) : ?>


Faique Fakier

August 31, 2015 at 3:36 pm

Sorted

Thanx Josh


Josh

  • Support Staff

August 31, 2015 at 3:38 pm

You’re welcome Faique.

The support post ‘People featured image’ 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