Displaying Event Thumbnail as Background Image in Calendar Cell

Home Forums Calendar Products Events Calendar PRO Displaying Event Thumbnail as Background Image in Calendar Cell

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1138865
    Sheldon
    Participant

    Hi there,

    Apologies if this is a duplicate post, however I wasn’t able to find anything on this. I’m hoping to display the Event thumbnail as the background image for the event’s table cell within the calendar view. If you look at my current site:
    http://d.pr/i/MC8o – you can see what I’m looking to do.

    Please advise as to if this is possible and the best practices for updating, so that I can still update the Events Calendar Pro plugin and not overwrite changes going forward.

    Thanks

    #1139140
    Geoff
    Member

    Hey Sheldon,

    What a great question! I haven’t seen this come up in the past and it’s certainly a cool idea.

    I do want to note that it will take a fair amount of custom development to make that happen. While we’re fairly limited in how much we can support that, I’d be happy to at least point you in the right direction, if I can.

    The function for grabbing an events featured image is this: tribe_event_featured_image()

    You can use that to fetch the image for an event by adding it to the single-event.php template, which is located here:

    /wp-content/plugins/the-events-calendar/src/views/month/single-event.php

    (It’s worth noting that you can override this template in your theme directory so that your changes do not get lost on future updates. The instructions are here in our Themer’s Guide.)

    Once you display the image in the template, you’ll want to use CSS to position the image correctly and display it behind the content. That will take some experimentation and testing, but should be achievable.

    Will this help you get started? Please let me know. 🙂

    Cheers!
    Geoff

    #1140320
    Sheldon
    Participant

    This reply is private.

    #1140459
    Geoff
    Member

    Right on! That’s so awesome to hear and I appreciate you following up to let me know. High fives all around!

    Cheers and have a great weekend. 🙂

    Geoff

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Displaying Event Thumbnail as Background Image in Calendar Cell’ is closed to new replies.