Add Link to Featured Image in Single Event View

Home Forums Calendar Products Events Calendar PRO Add Link to Featured Image in Single Event View

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1114403
    Ted
    Participant

    I found this thread: Modifying Links From Featured Image on Events Page which is exactly what I want to do: use the link added to “Event Website” as the link when you click the featured image on the single event view.

    The topic above mentioned that you were working on this for update 3.6, I’m wondering if this update occurred and how do I make it work? Currently the featured image doesn’t click at all in my single event view http://entertainment.accessvegas.com/index.php/event/celine-dion-4/2016-05-24/

    Thank you!

    #1115118
    Nico
    Member

    Hi Ted,

    Thanks for reaching out to us! I can help you here…

    The image in single event doesn’t have any links, this was changed as the other thread states. If you want to make it link to the Event Website URL, you can go ahead and create a template override (details on our themer’s guide) of the single event template (located at wp-content/plugins/the-events-calendar/src/views/single-event.php). Once the copy of the template is in place you can change line 58 for the code below to make this work:


    // print event featured image with event website link
    $image_html = get_the_post_thumbnail( $event_id, 'full' );
    $event_website = tribe_get_event_website_url();

    if ( ! empty( $image_html ) && ! empty ( $event_website ) ) {
    echo '

    ';
    } elseif ( ! empty( $image_html ) ) {
    echo '

    ' . $image_html . '

    ';
    }

    Please let me know if this works for you,
    Best,
    Nico

    #1115208
    Ted
    Participant

    Thank you for your help! I have forwarded this information to my developer.

    #1115390
    Nico
    Member

    That’s great Ted!

    Please keep me posted on this,
    Best,
    Nico

    #1115586
    Ted
    Participant

    Thank you again for the help! We got this working, the featured image is clickable in the single event view.

    #1115676
    Nico
    Member

    Thanks for the heads-up Ted and glad to hear you could sort this out 🙂

    I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.

    Best,
    Nico

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Add Link to Featured Image in Single Event View’ is closed to new replies.