Home › Forums › Calendar Products › Events Calendar PRO › Add Thumbnail to Calendar Grid View
- This topic has 6 replies, 3 voices, and was last updated 8 years, 10 months ago by Support Droid.
-
AuthorPosts
-
January 2, 2013 at 9:33 am #30185eocdesignParticipant
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?January 2, 2013 at 10:12 am #30187JonahParticipantHi 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
January 2, 2013 at 11:11 am #30193eocdesignParticipantHello 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…
January 2, 2013 at 12:08 pm #30200JonahParticipantHi 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
January 2, 2013 at 12:58 pm #30202eocdesignParticipantThanks Jonah! That answers all of my questions perfectly.
January 2, 2013 at 1:31 pm #30205JonahParticipantGlad to hear Caitlin, let us know if you need anything else!
– Jonah
July 7, 2015 at 6:26 am #978368Support DroidKeymasterThis 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. -
AuthorPosts
- The topic ‘Add Thumbnail to Calendar Grid View’ is closed to new replies.