Add Thumbnail to Calendar Grid View

Home Forums Calendar Products Events Calendar PRO Add Thumbnail to Calendar Grid View

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #30185
    eocdesign
    Participant

    Hello All,
    I need to add a thumbnail image for every event that is added to the calendar and I need the thumbnail to display in the grid view when the full calendar is displayed. Can this be done? If so how would I go about it?

    #30187
    Jonah
    Participant

    Hi Caitlin,

    You could do this by modifying the /wp-content/plugins/the-events-calendar/views/table.php file around line 133. Make a copy of that file and place in an ‘events’ folder in your active theme to make changes. You should just be able to use the_post_thumbnail() function from WordPress: http://codex.wordpress.org/Function_Reference/the_post_thumbnail

    Does that help?

    – Jonah

    #30193
    eocdesign
    Participant

    Hello Jonah,

    Thank you for the quick reply. So it is just a matter of adding :

    the_post_thumbnail( $size, $attr ); at line 133? And this will pull the featured image assigned for that event? I am assuming that I will need to have a custom post thumbnail size in the functions.php file for this as well…

    #30200
    Jonah
    Participant

    Hi Caitlin,

    Yes, would just put that on line 133 but be sure to wrap the tag in PHP tags like the other PHP code you see… And, you don’t have to use the size or attr arguments – it will use the post-thumbnail size (150×150) by default. But if you want a custom size, yes, you will need to add another size in your functions.php file and regenerate all image to generate the new size and then pass that size name in as an argument.

    Let me know if you have any other questions.

    – Jonah

    #30202
    eocdesign
    Participant

    Thanks Jonah! That answers all of my questions perfectly.

    #30205
    Jonah
    Participant

    Glad to hear Caitlin, let us know if you need anything else!

    – Jonah

    #978368
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Add Thumbnail to Calendar Grid View’ is closed to new replies.