• Resolved Eivind Ødegård

    (@meinmycell)


    Is it possible to display the time of events? When creating a new event, you specify the time of the event, but it doesn’t show up in the public-facing event list.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Marcel Pol

    (@mpol)

    Hi Eivind,
    With a PHP filter you can show the time as well. Please understand that when the time has passed, it will drop off the event list.
    My usage of time is for deciding when to have it dropped from the list, and I set it to 23:00 hours. I only have daily events, not timely events.
    An alternative might be to set the time in the description.
    Here is the PHP filter, you can add it to functions.php of your theme, preferably a child theme, or to your own plugin

    function my_ssec_get_the_date( $the_date, $format, $post ) {

    // Format the date as new, $the_date might not be a recognized format.
    // return get_the_date( 'd M', $post );

    $time = get_the_date( 'g:i A', $post );
    $the_date = $the_date . ' ' . $time;
    return $the_date;

    }
    add_filter( 'ssec_get_the_date', 'my_ssec_get_the_date', 10, 3 );

    Thread Starter Eivind Ødegård

    (@meinmycell)

    Thank you. I can do this 🙂 This is very useful for future reference. Will you also consider to add the functionality to the plugin itself?

    Plugin Author Marcel Pol

    (@mpol)

    This is now an option in 2.1.5.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Show event time’ is closed to new replies.