Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114 Event thumbnail not showing | Event Espresso - Staging Server
I have a custom home page that calls post’s thumbnail image. It’s pulling in all of the post’s thumbnails but not the event thumbnails. I have images uploaded in the Featured Image window, but they’re not showing up. My code for the post thumbnails looks like this: the_post_thumbnail(array( 'class' => 'postThumb' )); What code do I need to use to access the event thumbnail? Thanks!
This topic was modified 12 years, 1 month ago by Gabriele Erickson. Reason: edited code
Unfortunately the events are separate from the standard post thumbnail so you will need to do a little jiggling to get it to work.
<?php
$post_id = get_the_ID();
$meta_values = get_post_meta($post_id);
$image_url = $meta_values['event_thumbnail_url'][0];
echo $image_url;
?>
What this does is grabs the post ID and then the featured image url held in the post meta. This currently will just echo the url but if you add the variable into an image it can display it
<img src="<?php echo $image_url; ?>" />
This works from within the loop.
Also, with the latest version of Event Espresso (3.1.29.1) we have brought in a new featured image system, that simply needs to be turned on in the Template Settings options, and an image added in the normal way (via featured images box in the event). this is shown in the event list and event registration pages.
One other thing I should add, this requires the Events to have additional posts attached to them (scroll to bottom of the Event Editor and “Create a Post”
Viewing 2 reply threads
The support post ‘Event thumbnail not showing’ 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.