I tried to divide the conditions upcoming and others(eventcategory, past, eventcategory’past) in list by url.
As below.
<?php
$url = $_SERVER['REQUEST_URI'];
$search0 = '/category/';
$search1 = '/eventDisplay=past/';
if(preg_match($search0,$url)):
//Match category
elseif(preg_match($search1,$url)):
if(preg_match($search0,$url)):
//Match category&past
endif;
//Match past
else:
//Match upcoming
?>
But It doesn’t work //Match category&past.
Is there a way to separate it by something other than the URL?