Posted: July 11, 2016 at 9:21 am
|
In events and venues one can chose the desired template to be used. However, it is not possible for a person (people add-on) I would like to change the template being used to be the same one as for venues and events. |
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. |
|
|
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.
In the event details page it is displayed: In the people details page it is not: |
There are a few possible causes to this issue. You can rule these out one by one: |
|
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? |
|
|
Ok, understood. Clear answer. Do you have a code snipped that I could add to my custom template in order to output the featured image? |
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/ |
|
|
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.