Cannot Add Images to Events Widget

Home Forums Calendar Products Events Calendar PRO Cannot Add Images to Events Widget

Viewing 11 posts - 16 through 26 (of 26 total)
  • Author
    Posts
  • #1143710
    Nico
    Member

    Glad 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,
    Nico

    #1145911
    Aaron
    Participant

    Thanks,

    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.

    #1146312
    Nico
    Member

    Sure!

    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,
    Nico

    #1147209
    Aaron
    Participant

    This 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 —

    #1147222
    Aaron
    Participant

    Also, 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…

    #1147314
    Nico
    Member

    Thanks 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,
    Nico

    #1147329
    Aaron
    Participant

    Hi 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.

    #1147874
    Nico
    Member

    Thanks 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,
    Nico

    #1150190
    Aaron
    Participant

    Hi 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.

    #1150269
    Nico
    Member

    Hey 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,
    Nico

    #1158863
    Support Droid
    Keymaster

    Hey 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

Viewing 11 posts - 16 through 26 (of 26 total)
  • The topic ‘Cannot Add Images to Events Widget’ is closed to new replies.