Adding thumbnails in tribe events footer (single event)

Home Forums Calendar Products Events Calendar PRO Adding thumbnails in tribe events footer (single event)

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #948401
    Evgenii Rybak
    Participant

    Hello,

    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.

    #948434
    George
    Participant

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

    #948444
    Evgenii Rybak
    Participant

    This reply is private.

    #948704
    George
    Participant

    No 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

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Adding thumbnails in tribe events footer (single event)’ is closed to new replies.