Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter pjoyce

    (@pjoyce)

    Update

    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>
    <?php
     $events = eo_get_events(array(
             'numberposts'=>10,
             'event_start_after'=>'today',
             'showpastevents'=>true,//Will be deprecated, but set it to true to play it safe.
        ));
    
      if($events):
         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') );
              printf(
                 '<li><a href="%s"> %s </a> on %s </li>',
                 get_permalink($event->ID),
                 get_the_title($event->ID),
                 eo_get_the_start($format, $event->ID,null,$event->occurrence_id)
              );
         endforeach;
         echo '</ul>';
      endif;
     ?>
    </div>
    <!-- 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.

    Thread Starter pjoyce

    (@pjoyce)

    Stephen,

    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!

    Thread Starter pjoyce

    (@pjoyce)

    Thanks for the reply.

    Apologies, I’ve tried a few plugins recently so I must be thinking about another one.

    Thread Starter pjoyce

    (@pjoyce)

    OK, thanks for letting me know.

    Although I have to say that I came here because Momnt said they “…which we can’t really support” so it seems that I will have to rethink where I can get help!

Viewing 4 replies - 1 through 4 (of 4 total)