Open end time

This topic contains 3 replies, has 2 voices, and was last updated by  Stephen Harris 9 years, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #20064

    How can I put this in the shortcode-event-list.php?

    If an event has an open end time – don’t show, else show end time.
    http://www.roswellazaleafestival.com/events/

    Karen Atherholt
    #20067

    Hi Karen,

    How are you denoting an event with an open end time? Are you using a custom field?

    Stephen Harris
    #20069

    No, I just removed the ‘<?php echo __(”,’eventorganiser’) . ‘ ‘.eo_get_the_end($time_format); ?>’
    from my custom display page (shortcode-event-list.php).
    If I could put a custom field on the ‘add new event’ form to check ‘no end time’ –
    it might be easier to handle.

    Karen Atherholt
    #20072

    You could use the standard custom fields metabox, e.g. add a key open_ended and give it a value (e.g. 1), then:

    if( ! get_post_meta( get_the_ID(), 'open_ended' ) ) {
        echo __( 'End time', 'eventorganiser' ) . ' ' . eo_get_the_end( $time_format ); 
    }
    
    Stephen Harris
Viewing 4 posts - 1 through 4 (of 4 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.