Home › Forums › Calendar Products › Community Events › Event featured image link to full image
- This topic has 8 replies, 3 voices, and was last updated 8 years, 10 months ago by Support Droid.
-
AuthorPosts
-
July 24, 2013 at 4:56 am #56769soesitParticipant
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?
July 24, 2013 at 11:29 am #56912BarryMemberHi 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/
July 25, 2013 at 3:36 am #57039soesitParticipantHi 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="” />July 25, 2013 at 6:27 am #57058BarryMemberOrdinarily 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?
July 26, 2013 at 2:41 am #57283soesitParticipantin 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.July 26, 2013 at 2:42 am #57284soesitParticipantThis reply is private.
July 26, 2013 at 3:44 am #57287soesitParticipantSupport 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;
}July 26, 2013 at 5:32 am #57295BarryMemberOK, glad you’re sorted and thanks for sharing the code 🙂
July 7, 2015 at 6:26 am #979376Support 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 ‘Event featured image link to full image’ is closed to new replies.