Tagged: event date, search results, the events calendar
Hello guys!
I’m using The Event Calendar plugin. When using the global search, results include news (blog articles) and events. But the date under the event is wrong, I know this date is the time when the event entry has been created, but it will make a mess for visitors. So is it possible to display the real event date here? Can you provide a snippet or a quick code to do this?
Thanks in advance!
Marcella
Hi marcella-metae!
Open up /enfold/includes/loop-search.php and on line 40 you should see this.
<?php the_time('d M Y'); ?>
Change it to this.
<?php if ( get_post_type() === TribeEvents::POSTTYPE ) { echo tribe_get_start_date(); } else { the_time('d M Y'); } ?>
Cheers!
Elliott
Hi Elliott,
this perfectly works! Thank you very much! :-)
Cheers!
Marcella