Support » Plugin: Events Manager » [Plugin: Events Manager] Event List without expired Events

  • Resolved beatcasino


    The Event list shows all current and future events. That’s Ok.
    But a current event for me is time dependent.

    Event A from 24.05. 05am – 25.05. 4pm <- When the Event list is generated on the 25.05. at 5pm, the Event is still listed although it is already expired.

    Is there a possibility to configure that in the anywhere? I didn’t found a solution jet.

Viewing 2 replies - 1 through 2 (of 2 total)
  • you can create a new search attribute using this tutorials –

    also, additional snippet which can give you an idea

    add_filter( 'em_events_build_sql_conditions', 'my_em_scope_conditions',1,2);
    function my_em_scope_conditions($conditions, $args){
    	if( !empty($args['scope']) && $args['scope'] == 'this-week' ){
    		$start_date = date("Y-m-d", strtotime(date("Y").'W'.date('W')."1"));
    		$end_date = date("Y-m-d", strtotime(date("Y").'W'.date('W')."7"));
    		$conditions['scope'] = " (event_start_date BETWEEN CAST('$start_date' AS DATE) AND CAST('$end_date' AS DATE)) OR (event_end_date BETWEEN CAST('$end_date' AS DATE) AND CAST('$start_date' AS DATE))";
    	return $conditions;

    you can add this to your theme functions.php

    Plugin Author nwlforumsupport


    am going to marked this as resolved.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Events Manager] Event List without expired Events’ is closed to new replies.