Event featured image link to full image

Home Forums Calendar Products Community Events Event featured image link to full image

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #56769
    soesit
    Participant

    The [echo tribe_event_featured_image( null, ‘thumbnail’ );] code automatically wrap a link to the current event id. How do i link the image thumbnail to a larger image like ‘full’ in my template?

    #56912
    Barry
    Member

    Hi soesit, there are a few ways you might do this. One could be to drop a snippet like this one into your theme’s functions.php file.

    Alternatively you could override and replace the single-event.php template and put your own code for working with the featured image in there, in place of the current code which looks like:

    echo tribe_event_featured_image();

    For details on template overrides, if that’s the path you’d prefer, please see our Themer’s Guide: https://theeventscalendar.com/support/documentation/events-calendar-themers-guide/

    #57039
    soesit
    Participant

    Hi Barry, thank you for your reply.
    The code snippet for in the functions doenst not really cover what i need. Because the image links now to the same image size. i dont know how to change the url for the a href=. Is there a way to echo only the image sources in the template?
    So i am able to something like this
    <a href="”>
    <img src="” />

    #57058
    Barry
    Member

    Ordinarily the featured image on single event pages is indeed the full-sized image, so yes that is what will be linked to.

    If that isn’t the case with your theme/set of plugins then something else may be at work. I did visit the URL you provided when you opened this thread but couldn’t locate your events – can you provide a link to a live example?

    #57283
    soesit
    Participant

    in my template file i use ‘echo tribe_event_featured_image( null, ‘medium’);’
    And the code snippet in the functions. I need to change the $image_src for the a href.

    #57284
    soesit
    Participant

    This reply is private.

    #57287
    soesit
    Participant

    Support is not longer necessary on this case, i “solved” it with css. Displaying the full image and css code
    .tribe-events-event-image img{
    width:200px;
    height:200px;
    }

    #57295
    Barry
    Member

    OK, glad you’re sorted and thanks for sharing the code 🙂

    #979376
    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 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Event featured image link to full image’ is closed to new replies.