Home › Forums › Calendar Products › Events Calendar PRO › Cannot Add Images to Events Widget
- This topic has 26 replies, 4 voices, and was last updated 9 years, 8 months ago by
Aaron.
-
AuthorPosts
-
July 25, 2016 at 10:25 am #1143710
Nico
MemberGlad to hear we are making some progress here!
1. I am using “This Week Events” as the widget. Can you confirm that’s correct?
Totally possible. I didn’t get the screenshots thou 🙁
2. When I swapped between “This Week Events” and “Events Calendar” the “Events Calendar” widget DID show images! But it was vertical, and does not seem to have an easy way to customize the layout (to horizontal). And it showed a mini-version (icon) of the monthly calendar.
Looks like you are using another widget indeed. The tutorial is valid for list widget and advanced list plugins. If you are using this week widget we can also embed the image there, it just will require another coding. But if that’s the case please let me know and I’ll look into it!
Thanks,
NicoJuly 31, 2016 at 8:40 am #1145911Aaron
ParticipantThanks,
I guess I’m confused by which widget to use. I don’t care which one it is, I would just like there to be images and a horizontal format.
Could you point me to the exact widget needed, by name: List Widget? I’m not seeing that one. If there is a further need to custom code, I may be out of luck as I’m clearly very limited in my customization abilities. I’m happy to send you any login info to my site that might help solve this quickly and finally.
August 1, 2016 at 4:03 pm #1146312Nico
MemberSure!
The only widget that works well on horizontal layout is ‘This Week Events’ widget (that’s the exact name) so we’ll use this one. To add the featured image you’ll need to create a template override (I guess you are familiarized at this point, but remember to check the themer’s guide for any details) of the file and place it in: [your-theme]/tribe-events/pro/widgets/this-week/single-event.php. Once the copy of the file is in place just add the following line:
<?php echo tribe_event_featured_image( $event->ID, 'thumbnail' ); ?>
Just make sure it’s inside the main div element.
Give a try and let me know about it,
Best,
NicoAugust 3, 2016 at 10:41 am #1147209Aaron
ParticipantThis is great!
Images show!
One issue now: images for an event NOT this week shows up beneath each event listed for this week. How do I remove this? I checked our events calendar and it’s not listed as a recurring event, or on the wrong date (it’s an event on 9/5, “Get Summered”).
See screenshot —
August 3, 2016 at 10:59 am #1147222Aaron
ParticipantAlso, as an aside: 9/5 is the last date we have listed on our calendar.
I disabled the 9/5 event to see what would happen. The 9/4 event defaulted as the event title instead (see attached screenshot, similar to my previous post).
Any idea why the last listing from our calendar would pull into the date and title field, but the image for the day of the (current) week is correct?
Thanks…
August 3, 2016 at 1:02 pm #1147314Nico
MemberThanks for following up! Glad to hear you could make the images work in there.
Regarding the new issue, I’m not seeing that locally but if you disable the template override (by renaming it for example to ‘_single-event.php’), does this still happens?
Please let me know about it,
Best,
NicoAugust 3, 2016 at 1:29 pm #1147329Aaron
ParticipantHi Nico,
Renaming the file as you suggested brings it back to picture-less status.
I’m not sure what you not seeing the new issue I described “locally” means (apologies again for my lack of tech savvy!), but I cannot figure out why it shows the title and headline (and date) of our last calendar event, even though the header for the “week’s events” shows correct date and date event image.
Is there a “settings” feature I might need to adjust? Or might I have put the code snippet in a wrong location in the “single-event” page?
I have asked some people with more web experience to assist, but no one can seem to be able to sort this out — so again, thank you.
August 4, 2016 at 3:55 pm #1147874Nico
MemberThanks for following up Aaron! We are almost there!
Renaming the file as you suggested brings it back to picture-less status.
I understand but are events showing correctly the title and date when you remove the template override?
I’m not sure what you not seeing the new issue I described “locally” means (apologies again for my lack of tech savvy!)
Just to make sure we are on the right path I’m making the same test in sample WordPress site in my computer.
Is there a “settings” feature I might need to adjust? Or might I have put the code snippet in a wrong location in the “single-event” page?
No extra settings are needed. Take a look at how I edited my copy of ‘single-event.php’:
https://gist.github.com/niconerd/d4bf4aae0a9eb6f1164e8eebc9ab8a54
Please try to place the exact same code above in the file and let’s hope that makes it right,
Best,
NicoAugust 10, 2016 at 1:31 pm #1150190Aaron
ParticipantHi Nico,
The code snippet you sent: where should I drop it in? Any particular code line #?
Should I also rename the file back to “single-event.php” instead of “_single-event.php”? When I name it back to original, a duplicate event image shows up, but it pulls the event date from the last date listed in the events calendar. Sorry I’m not getting anywhere with this.
August 10, 2016 at 3:34 pm #1150269Nico
MemberHey Aaron, sorry to hear you are still struggling to make this right!
The code snippet you sent: where should I drop it in? Any particular code line #? Should I also rename the file back to “single-event.php” instead of “_single-event.php”? When I name it back to original, a duplicate event image shows up, but it pulls the event date from the last date listed in the events calendar.
The code sent is the actual content of the override file located at [your-theme]/tribe-events/pro/widgets/this-week/single-event.php. So, yes rename it back to ‘single-events.php’, remove all the file contents and replace it with the following:
https://gist.github.com/niconerd/d4bf4aae0a9eb6f1164e8eebc9ab8a54
Save the file and check on the front-end if it works now!
Thanks for the patience while we work on getting this right,
Best,
NicoSeptember 1, 2016 at 9:35 am #1158863Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Cannot Add Images to Events Widget’ is closed to new replies.
