Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #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!


    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'); } ?>



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

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