Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #377302

    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

    #377591

    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

    #378192

    Hi Elliott,
    this perfectly works! Thank you very much! :-)
    Cheers!
    Marcella

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Display real event date in search results’ is closed to new replies.