Hi,
I've taken a look at your code and create this example code. I've had to make a number of assumptions in this code:
- You have an event section and create a record set called $eventRecords
- The event section has a field called date, for the date of the event
- There is a field called time, location, and description
You may have to alter the code to fit with your current set up.
<?php
$eventsPerSlide = 2;
$eventCount = 0;
?>
<div class="text-slider">
<ul class="slides">
<li>
<?php foreach ($eventRecords as $event): ?>
<?php
$eventMonth = date("M", strtotime($event['date']));
$eventDay = date("d", strtotime($event['date']));
?>
<!-- BEGIN .clearfix -->
<div class="clearfix">
<!-- BEGIN .one-half -->
<div class="one-half blog-event-one-half">
<div class="event-preview">
<div class="event-date-wrapper">
<div class="event-month"><?php echo $eventMonth;?></div>
<div class="event-day"><?php echo $eventDay;?></div>
</div>
<div class="event-entry-inner">
<h4><a href="<?php echo $event['_link'];?>"><?php echo $event['title'];?></a> <span>Event Time: <i><?php echo $event['time'];?></i> / Event Location: <i><?php echo $event['location'];?></i></span></h4>
<?php echo $event['description'];?>
</div>
</div>
<!-- END .one-half -->
</div>
<?php if (++$eventCount % $eventsPerSlide == 0): ?>
</li><li>
<?php endif ?>
<?php endforeach ?>
</li>
</ul>
</div>
Give this a try and let me know if you have any questions.
Thanks,
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/