Multiday Event

This topic contains 2 replies, has 2 voices, and was last updated by  pach16 10 years, 6 months ago.

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

    Stephen,

    Is there a way to only show the end date on the event-list page for events that span multiple days?

    pach16
    #7716

    Yup. The default template only shows the start date, but you can do the following:

    if( eo_get_the_start('Y-m-d') != eo_get_the_end('Y-m-d') ){
        //Event spans multiple days
        echo eo_get_the_start('jS F Y') . ' - ' . eo_get_the_end('jS F Y');
     }else{
        //Event spans one day
        echo eo_get_the_start('jS F Y');
     }
    Stephen Harris
    #7745

    Perfect thanks Stephen.

    pach16
Viewing 3 posts - 1 through 3 (of 3 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.