Home › Forums › Calendar Products › Events Calendar PRO › Adding thumbnails in tribe events footer (single event)
- This topic has 3 replies, 2 voices, and was last updated 11 years, 1 month ago by
George.
-
AuthorPosts
-
March 15, 2015 at 5:59 am #948401
Evgenii Rybak
ParticipantHello,
Is there a snippet to add featured images in tribe-events-nav-next and tribe-events-nav-previous in the footer for single event?
I found a similar snippet for adding thumbnails to Upcoming Events list widget:
function custom_widget_featured_image() {
global $post;
echo tribe_event_featured_image( $post->ID, ‘thumbnail’ );
}
add_action( ‘tribe_events_list_widget_before_the_event_title’, ‘custom_widget_featured_image’ );How do I change it to do the same for tribe-events-nav-next and tribe-events-nav-previous in the footer for single event?
Thanks for help.
March 15, 2015 at 10:41 am #948434George
ParticipantHey Evgenii,
Thanks for reaching out to us. There’s some good news and bad news here 🙂
First, the good news is that you can, indeed, customize the Previous and Next navigation links pretty extensively. The best way to do this is to create a custom navigation file in your theme, which will be used instead of the default markup that comes from the plugin. You can add featured images and anything else you’d like.
To learn how to do this, check out our official Themer’s Guide for guidance on making custom theme views like this → https://theeventscalendar.com/knowledgebase/themers-guide/
The specific file you’d want to override is the file in the plugin at /views/list/nav.php.
Now, the bad news: getting a specific post’s featured image requires the post ID of that specific post, but this is quite hard to get from within the navigation loop. I personally was not able to concoct a simple way to do this in about ten minutes of experimentation for this support ticket, so it might take quite a bit of trial and error to get post IDs from previous/next “pages” of events, and then use that ID to get the featured image.
I hope the information here helps you get started, and that you’re able to put something together that works for your project. Let us know if this helps or if you have other questions or concerns here!
Thanks,
GeorgeMarch 15, 2015 at 11:52 am #948444Evgenii Rybak
ParticipantThis reply is private.
March 16, 2015 at 3:11 pm #948704George
ParticipantNo worries Evgenii, sorry we don’t have the bandwidth to offer more specific help here. Since your specific questions about the thumbnails are addressed here, I’ll close up this particular ticket, but don’t hesitate to come back and open a new ticket at any time if you have other questions or concerns!
Cheers! Best of luck with your customizing 🙂
George -
AuthorPosts
- The topic ‘Adding thumbnails in tribe events footer (single event)’ is closed to new replies.
