Home › Forums › Calendar Products › Events Calendar PRO › Modifying Links From Featured Image on Events Page
- This topic has 6 replies, 3 voices, and was last updated 9 years, 11 months ago by Leah.
-
AuthorPosts
-
February 5, 2014 at 12:21 am #100912bigriverseoParticipant
Great plugin, guys. Very impressive.
My questions is related to the Featured Image that I am attaching to events. This image shows up in the Calendar List View (as a thumbnail), and also at the top of individual event pages.
In both of these locations, the on this featured image, redirects to the event page URL. However, on the event page itself, this really doesnt make sense. Clicking on the image is effectively redirecting to itself.
Ideally, I would like the featured image on the events page to instead to the URL that was entered for “Event Website”. At the same time, it would make sense for the featured image displayed on the index pages to continue to to the specific event pages.
If this isn’t possible, can you tell me how to disable the featured image on event pages, so that I can instead just manually add the images and manipulate the linked URLs myself.
February 6, 2014 at 2:23 pm #101533BarryMemberHi – great question and a valid point about the redundancy of linking to the same page the visitor is already on.
What you can do here though is override and customize the single-event.php template – please see our Themer’s Guide for an overview of this process. In that template you would look for this line:
<?php echo tribe_event_featured_image(); ?>
Which pulls in the thumbnail, wrapped inside a link. You are more than welcome to replace this – there is nothing particularly special about our featured images – insofar as they follow normal WordPress conventions – so you could simply replace it with your own code that either pulls in the featured image by itself or, additionally, wraps it in a link to the event website (if that field has been populated).
Does that help?
February 6, 2014 at 10:20 pm #101781bigriverseoParticipantBarry, thanks for your reply. Can you help me determine the correct function to replace “tribe_get_event_link()” with? I have been trying “tribe_get_event_website_url”, but it doesn’t seem to be an exact match (I even tried a modified version that only returns one value).
===============================================================
if ( !empty( $image_src ) ) {
$featured_image .= ‘<div class=”tribe-events-event-image”></div>’;
}February 7, 2014 at 6:44 am #101862BarryMemberHi! The basic pattern should be something like this:
<a href="<?php echo esc_url( tribe_get_event_website_url() ) ?>"> (Your featured image code) </a>
Does that help?
February 21, 2014 at 6:48 am #107932BarryMemberHoping you’re all sorted here and will go ahead and close this thread. If we can help with anything else please don’t hesitate to create a new thread – thanks!
March 27, 2014 at 2:51 pm #123968BarryMemberUnfortunately we weren’t able to squeeze this one (the featured image linking back to the same page it is already embedded within) into our next upcoming release (3.5) but I wanted to drop a note in here to let you know it’s still on our radar and we will try hard to fit it in to the next release instead. Thanks for your support and patience in the meantime!
May 23, 2014 at 11:52 am #172245LeahMemberHi there,
I just wanted to let you know that we have been working diligently on a fix for this issue. Our next release (3.6) will be available soon and should correct this problem. Please keep an eye on your Plugins and Updates pages for a version update. If you are still having problems after updating, please start a new thread with the details and we can assist you.
Best,
Leah -
AuthorPosts
- The topic ‘Modifying Links From Featured Image on Events Page’ is closed to new replies.