Viewing 15 replies - 1 through 15 (of 21 total)
  • Thread Starter tallavic

    (@tallavic)

    Hello! Is anybody out there??

    Thread Starter tallavic

    (@tallavic)

    I really need this feature! (show past events)
    If somebody can help me please reply me.

    Thank you

    Looks like there isn’t much “support.” I’m finding another option.

    Thread Starter tallavic

    (@tallavic)

    I’ve resolved it!
    If someone want to view the solution reply this post.

    Hello!
    How do you show past events?

    Thread Starter tallavic

    (@tallavic)

    You have to put this after the extract

    if($atts['time'] == 'past')
    			$time = "<";
    		else $time = ">=";
    
    		echo $ecs_eventDate;
    
    		$posts = get_posts( array(
    				'post_type' => 'tribe_events',
    				'posts_per_page' => $ecs_limit,
    				'tax_query'=> $ecs_event_tax,
    				'meta_key' => '_EventEndDate',
    				'orderby' => 'meta_value',
    				'order' => $ecs_order,
    				'meta_query' => array(
    									array(
    										'key' => '_EventEndDate',
    										'value' => date('Y-m-d'),
    										'compare' => $time,
    										'type' => 'DATETIME'
    									)
    								)
    		) );

    hi,
    I would really like to implement what you have found,

    would you be able to advice on where abouts i woudld need to enter this code?

    Thanks
    Jon

    Thread Starter tallavic

    (@tallavic)

    After this code

    if ($ecs_cat) {
    			$ecs_event_tax = array(
    				array(
    					'taxonomy' => 'tribe_events_cat',
    					'field' => 'slug',
    					'terms' => $ecs_cat
    				)
    			);
    		}

    sorry could you mention which php file?

    thanks

    Thread Starter tallavic

    (@tallavic)

    In the file called the-events-calendar-shortcode.php
    There is only this file in the plugin!!

    thanks sorry, i was under the impression it was in the main plugin somewhere

    So what short code do you use once you have added this code? I just want past events to shown on a page.

    Thanks!

    Patty,

    There isn’t a shortcode to show past events. The plugin assumes you want to show upcoming events. The code provided above by tallavic can be added to the-events-calendar-shortcode.php file to change this

    Thread Starter tallavic

    (@tallavic)

    After added my code, you’ve have to use the shortcode
    [ecs-list-events time=”past”]

    Hmm….tried the shortcode after pasting your code and I am still getting current events. I will contact my theme designer to see if there is a conflict with the theme.

    Thanks for your help!

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Show past events’ is closed to new replies.