Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Prasad

    (@bagraoprasad)

    i have solved this ??

    i have just replace desc with asc in sc_event-list.php

    file path: event-list/includes/sc_event-list.php

    Thread Starter Prasad

    (@bagraoprasad)

    if you want to short event by ascending order then simply replace desc with asc in below code in sc_event-list.php file

    private function html_events( &$a ) {
    		// specify to show all events if not upcoming is selected
    		if('upcoming' != $a['actual_date']) {
    			$a['num_events'] = 0;
    		}
    		$date_filter = $this->get_date_filter('all', $a['actual_date']);
    		$cat_filter = $this->get_cat_filter($a['cat_filter'], $a['actual_cat']);
    		if( '1' !== $this->options->get( 'el_date_once_per_day' ) ) {
    			// normal sort
    			$sort_array = array( 'start_date DESC', 'time DESC', 'end_date DESC' );
    		}
    		else {
    			// sort according end_date before start time (required for option el_date_once_per_day)
    			$sort_array = array( 'start_date DESC', 'end_date DESC', 'time DESC' );
    		}
    		$events = $this->db->get_events($date_filter, $cat_filter, $a['num_events'], $sort_array);
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘hoe to sort event by date’ is closed to new replies.