Support » Plugin: Event Organiser » Output event list in columns?

  • I’m currently using the basic code below to display a list of the next 8 upcoming events:

    <div id="featuredPages" class="full homeSection clearfix">
        <h3><span>UPCOMING EVENTS</span></h3>
        <?php echo do_shortcode("[eo_events event_end_after='today' event_start_before='+5 month']<a href='%event_url%'>%event_title%</a><br />on %start{jS M Y}{ g:i:a}%,<br />at %event_venue%[/eo_events]"); ?>

    Rather than producing the events in one list, does anyone know a way to output the list into 2 or 3 columns, ie.

    Event 1 Event 4
    Event 2 Event 5
    Event 3 Event 6

    I would prefer it this way to reduce space.

    Sadly I cannot show the current output in a URL as it’s for a client.

    Any suggestions are very much appreciated!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Stephen Harris


    If you remove the template tags, it will use this the shortcode event list template (see templates directory). Copy that into your theme and edit it there to display the events in a table.

    See this page for details:

    (I would recommend not using the shortcode but instead just using the available API: – better performance and easier to work with).


    Thanks for the reply. I’m not that familar with PHP/API and only created the above code after reading previous replies/snippets of code from other answers.

    However I will have a look at your links and see if something makes sense!


    I made a change so the API is used from your link and it now looks like:

    <!-- New section -->
    <div id="featuredPages" class="full homeSection clearfix">
        <h3><span>UPCOMING EVENTS</span></h3>
     $events = eo_get_events(array(
             'showpastevents'=>true,//Will be deprecated, but set it to true to play it safe.
         echo '<ul>';
         foreach ($events as $event):
              //Check if all day, set format accordingly
              $format = ( eo_is_all_day($event->ID) ? get_option('date_format') : get_option('date_format').' '.get_option('time_format') );
                 '<li><a href="%s"> %s </a> on %s </li>',
                 eo_get_the_start($format, $event->ID,null,$event->occurrence_id)
         echo '</ul>';
    <!-- New section -->

    It looks good but of course shows the events in one list.

    I’m still not sure how I can get the events listed in a table though. I’m completely new to PHP. I’m guessing I need to look at archive-event.php but am not sure of the next steps.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Output event list in columns?’ is closed to new replies.