// CREATE EVENT HEADER, FOOTER, AND CONTENT AREA $featuredEvtHeader = ' '; $featuredEvtFormat = ' '; $featuredEvtFooter = '
Date Activity Location
#_{d/m/Y} #@_{- d/m/Y}
#H:#i -#@H:#@i
#_EVENTNAME
#_CATEGORY
#_LOCATIONLINK
'; if (class_exists('EM_Events')) { // Get link to the main calendar of events $event_page_link = trailingslashit(get_permalink(get_option("dbem_events_page"))); // Echo a page title called "DAILY EVENTS" // (we're sorting by days but could sort by weeks or months or years) echo '

Daily Events

'; // START IGNORE - but if you need this code I'd be happy to provide it) // ADD "featured-image" from the page admin $my_featured_image = my_postimage_picker($myimagetype='post-thumbnails', 0, $myimageclass='header-image'); echo $my_featured_image; // END IGNORE // place any CMS copy / text below the heading and main photo the_content(); // This is the default php to echo the events // NOTICE it is commented out as we are calling a separate funciton //echo EM_Events::output( array( // echo the grouped events so we can have headers above each group // echo GROUPED events (I'm chosing 'daily' to get a DATE header, // this way I don't have to repeat the date for each entry under the same date) // This will accept all of the same arguments as EM_Events echo em_events_list_grouped( array( 'orderby'=>'event_start_date', 'pagination'=>1, 'limit'=>10, // the header above each content grouping (immediately following the DATE HEADER) 'format_header' => $featuredEvtHeader, // format each event's display 'format'=>$featuredEvtFormat, // the footer below each content grouping (what closes each content group) 'format_footer' => $featuredEvtFooter, // determines how to group the events. // choices are 'daily', 'weekly', 'monthly', 'yearly' // each of those will place a header above that group // so 'daily' will put the date, then list all events under that date 'mode'=>'daily', ) ); }