Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    The only way to do that would be to create your own version of that placeholder, like this:

    https://wp-events-plugin.com/tutorials/modifying-placeholder-default-information/

    Thread Starter Creastic

    (@creastic)

    Thank you.

    I do that and it’s work, do you think i could do simpler ?

    add_filter('em_location_output_placeholder','my_em_placeholder_mod',1,3);
    function my_em_placeholder_mod($replace, $EM_Location, $result){
    	if ( $result == '#_LOCATIONPASTEVENTS' ) {
    		$events_count = EM_Events::count( array('location'=>$EM_Location->location_id, 'scope'=>$scope) );
    		if ( $events_count > 0 ){
    					    $args = array('location'=>$EM_Location->location_id, 'scope'=>$scope, 'pagination'=>1, 'ajax'=>0);
    					    $args['format_header'] = get_option('dbem_location_event_list_item_header_format');
    					    $args['format_footer'] = get_option('dbem_location_event_list_item_footer_format');
    					    $args['format'] = get_option('dbem_location_event_list_item_format');
    						$args['limit'] = get_option('dbem_location_event_list_limit');
    						$args['page'] = (!empty($_REQUEST['pno']) && is_numeric($_REQUEST['pno']) )? $_REQUEST['pno'] : 1;
    						$args['orderby'] = "event_end_date";//ordre d'apparition
    						$args['order'] ="DESC";
    					    $replace = EM_Events::output($args);
    					} else {
    						$replace = get_option('dbem_location_no_events_message');
    					}
    
    	}
    	return $replace;
    }

    Looks good to me.

    Hi, where can i put this code (the code of creastic)

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘#_LOCATIONPASTEVENTS order by end_date asc’ is closed to new replies.