Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
PHP: conditionally display $end_date if it's different than $start_date | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium PHP: conditionally display $end_date if it's different than $start_date

PHP: conditionally display $end_date if it's different than $start_date

Posted: December 19, 2013 at 11:34 am

Viewing 3 reply threads


artsguild

December 19, 2013 at 11:34 am

I think it’s silly to say on a event
Date: Dec 1, 2014 – Dec 1, 2014
I’d rather only give the $end_date if it’s different than the $start_date.

Any pointers would be greatly appreciated. Thanks!


<?php // I'd like to NOT display the end date if it's the same as start_date
if( event_date_display($start_date) != event_date_display($end_date){
echo event_date_display($end_date, get_option('date_format'));
}
?>

  • This topic was modified 11 years, 1 month ago by artsguild.


Sidney Harrell

  • Support Staff

December 19, 2013 at 1:03 pm

It looks like that is already the case on the registration page display on the latest version. Where are you seeing that and what version of EE are you using?


artsguild

December 19, 2013 at 6:39 pm

Thanks! I’m working in the event_list_display.php circa 3.1.36.1.P
And in the ‘table view’.

I’ll have a look at the registration_page_display.php
for the example.


Anonymous

December 23, 2013 at 1:42 am

Hi artsguild,

Just wondering if you found the example within registration_page_display.php and were able to copy it over?

Viewing 3 reply threads

The support post ‘PHP: conditionally display $end_date if it's different than $start_date’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso - Staging Server