{var $eventsProOptions = get_option('ait_events_pro_options', array())} {var $eventsCount = $eventsProOptions['sortingDefaultCount']} {var $orderBy = $eventsProOptions['sortingDefaultOrderBy']} {var $order = $eventsProOptions['sortingDefaultOrder']} {if $orderBy == 'eventDate'} {var $orderBy = 'post__in'} {/if} {var $eventsQuery = AitEventsPro::getEventsByItem($post->id, array('posts_per_page'=>$eventsCount, 'orderby' => $orderBy, 'order' => $order))}