Support

Home Forums Event Espresso Premium Featured image not displaying on Event

Featured image not displaying on Event

Posted: November 11, 2020 at 9:07 am

Viewing 19 reply threads


Arty-Folks

November 11, 2020 at 9:07 am

Hi,
I’ve added a featured image to my event, it is displaying in the calendar but not on the event page. We’re using the Alone theme which normally displays featured images at the top of each page but this doesn’t appear to be working for the Events or Venues pages. Do you have any suggestions how I can fix this?
Thanks


Tony

  • Support Staff

November 12, 2020 at 6:05 am

Hi there,

A lot of the output of the events/venues is controlled by your, we hook in and add the event details but it’s actually your theme that outputs things like the featured image.

We’ve seen other themes in the past only display certain features for specific post types which may be happening here.

Can you send me a copy of the theme so I can take a quick looks? If they have a hook I can use to alter this I should be able to give you a snippet to fix it.


Arty-Folks

November 16, 2020 at 4:54 am

Thanks for your reply Tony.

I’ve only recently taken over managing the website and am still learning… how do I send a copy of the theme?

Thanks


Tony

  • Support Staff

November 17, 2020 at 3:53 am

So, assuming the Alone theme is a one from ThemeForest HERE them I’m guessing you don’t have the login details for ThemeForest to download the .zip file from there?


Arty-Folks

November 18, 2020 at 4:52 am

Hi Tony,

I’m just waiting on the details from the developer who created our website, I’ll update once I’ve got them.

Thanks


Tony

  • Support Staff

November 18, 2020 at 4:55 am

Ok, thank you.

The .zip file directly from TF (ThemeForest) is best but it is possible to pull the files from the site itself if you have FTP access.


Arty-Folks

November 23, 2020 at 2:06 am

Hi Tony,

I’ve got the .zip file now. How do I send it to you?

Thanks


Tony

  • Support Staff

November 23, 2020 at 3:01 am

You’ll need to either host the file somewhere (upload it to the site for example) and post a link to download here.

Or, use something like WeTransfer to send a copy to support[at]eventespresso.com


Arty-Folks

November 23, 2020 at 8:28 am

Thanks, I’ve sent it with WeTransfer


Tony

  • Support Staff

November 24, 2020 at 5:42 am

Hi there,

On installing your theme, my site shows the featured image on EE events just fine.

Looking at your events the feature image is loading but there’s some styles to hide it in your theme, you can override them using something like:

.single-espresso_events .post-single-entry-header {
    display: block!important;
}

You can add that to Appearance -> Customize -> Additional CSS.


Arty-Folks

November 24, 2020 at 5:57 am

Thanks, I’ve added this now and can see the featured image although it’s below the grey header where I was hoping it would be. Is there any way to add an image in the header of the page so that it ties in with the other pages on the website or is this not possible for events?
Thanks for your help.


Tony

  • Support Staff

November 24, 2020 at 6:14 am

Alone theme looks like it limits the features available if you don’t have a valid key, so I can’t see how the pages are created on the site as is.

Looking at the source code from your site it looks like its using visual composer and if thats the case you can’t use it within EE events to output the same content.

Can you add a screenshot of how you set the feature images to load on normal pages?


Arty-Folks

November 24, 2020 at 7:15 am

So we use two different approaches depending on whether it is a blog or a page, I’ve sent you screenshots of both options. I was hoping with EE it would work in a similar way to the blog posts where we set both a featured image and a header image but it appears there is no option for a header image in EE?
For the pages you are right, we are using the Visual page template and creating the header with a stretch section at the top of the page.
Thanks


Tony

  • Support Staff

November 26, 2020 at 6:02 am

In short, that’s all custom to your theme and the ‘header_image’ isn’t being added to EE’s editor by your theme so it can’t work like normal posts.

What you could do is hook into the save_post hook and save the values from the feature image set on the post into the settings used by the theme.

How comfortable with PHP are you?


Arty-Folks

November 30, 2020 at 4:18 am

Unfortunately I don’t know any PHP!
Looks like we might just have to put up with it being grey. Thanks for your help looking into it for me though.


Tony

  • Support Staff

November 30, 2020 at 5:09 am

I spent some time looking over this on the weekend as I was curious and have a snippet that uses the feature image set on EE Events/Venues to set the options values that the theme is expecting.

Before you use this I should note that this snippet is unsupported and if you run into further issues with the the feature image you’ll need to contact the theme author as its the theme and not Event Espresso.

Are you using a child theme? If so, add this to your child themes functions.php file:

https://gist.github.com/Pebblo/8cd7cbe214e3fc36cec2f17f3c931de4

If not you can create a custom functions plugin to use it and we have documentation on creating one here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/
(It’s not as scares as it sounds)

Once you have that code on your site, edit an event and set a feature image on it, if you already have one set, just save the event (it updates the theme settings for that event on save). Then confirm it works as intended.


Arty-Folks

December 1, 2020 at 3:14 am

Hi Tony,

Thanks so much for your help on this.

The alone-child folder doesn’t contain a functions.php file, only the alone folder. I take it this means we’re not using a child theme so I need to go down the custom functions plugin route?

Thanks


Tony

  • Support Staff

December 1, 2020 at 3:37 am

You can do either, you’ll need to set up the child theme with a functions.php file and then activate the child on the site:

https://developer.wordpress.org/themes/advanced-topics/child-themes/

Or set up the custom functions plugin as above.

If the above snippet is the only one change you are making to the theme’s output then using a custom functions plugin is fine.


Arty-Folks

December 1, 2020 at 4:10 am

Thank you so much – I’ve implemented a custom function plugin and it’s working now.


Tony

  • Support Staff

December 1, 2020 at 4:35 am

You’re most welcome 🙂

Viewing 19 reply threads

The support post ‘Featured image not displaying on Event’ 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