Support

Home Forums Event Espresso Premium Choosing templates for people (people add-on)

Choosing templates for people (people add-on)

Posted: July 11, 2016 at 9:21 am


ARAGATO

July 11, 2016 at 9:21 am

In events and venues one can chose the desired template to be used.
http://uploads.aragato-server.net/screenshots/2016071128f1f42b0f.jpg

However, it is not possible for a person (people add-on)
http://uploads.aragato-server.net/screenshots/20160711a943a94c6e.jpg

I would like to change the template being used to be the same one as for venues and events.


Josh

  • Support Staff

July 11, 2016 at 1:27 pm

You can change the templates for People post types by installing this WordPress plugin:

https://wordpress.org/plugins/custom-post-type-page-template/

Then you go to its settings page, and check the box next to espresso_people, then save.


ARAGATO

July 12, 2016 at 3:45 am

Great, works.

In the documentation for the People AddOn it says that the featured image is displayed on the details page. However, it is not displayed.

Full name, description, and featured image are used on the people listings page (e.g. example.com/people/) and single person page (e.g. example.com/people/full-name/).

In the event details page it is displayed:
http://uploads.aragato-server.net/screenshots/20160712d97be4a4bf.jpg

In the people details page it is not:
http://uploads.aragato-server.net/screenshots/2016071285aa67957b.jpg


Josh

  • Support Staff

July 12, 2016 at 8:16 am

There are a few possible causes to this issue. You can rule these out one by one:
1) A theme conflict. You can rule this out by temporarily switching to the default WordPress theme.
2) A plugin conflict. You can rule this out by temporarily deactivating any other installed WordPress plugins.


Tony

  • Support Staff

July 12, 2016 at 8:20 am

The documentation should be a little clearer here.

The feature image is used on the single person page, however only if your theme actually calls the feature image for single posts (and also not specific post types).

An Event Espresso ‘person’ is a custom post type which means it uses your themes single.php template to output the details. EE injects the persons details into the_content but it does not inject code to output the feature image because your theme should already do it for posts meaning it would be output twice.

Which theme are you using?


ARAGATO

July 12, 2016 at 10:22 am

Ok, understood. Clear answer.
I am using a custom coded theme, so nothing publicly available.
Additionally, I use the plugin “Custom Post Type Page Template” and changed the default template from single.php to a custom one.

Do you have a code snipped that I could add to my custom template in order to output the featured image?


Josh

  • Support Staff

July 12, 2016 at 10:29 am

<?php the_post_thumbnail(); ?>

There are a few parameters you can add to the above to add finer control of the image size and markup too. They’re listed in the WordPress Code reference:

https://developer.wordpress.org/reference/functions/the_post_thumbnail/


ARAGATO

July 12, 2016 at 10:46 am

Top. Works like a charm.

The support post ‘Choosing templates for people (people add-on)’ 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