Magic fields duplicate groups over 2 columns
-
Hi,
I am using Magic Fields to create a menu system for someone and have it working great so far. My problem is that I want to display, say 5, duplicated groups (dishes) in one column and then the other 5 in a 2nd column next to it!?
I have code working to display everything fine one after another in a single column but don’t know how to edit my loop to split it into 2 columns!? My code is below:
<div class="menu">
<?php query_posts('category_name=food&order=ASC'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php $myEvent = get_group('food section'); foreach($myEvent as $event){ ?>
<div class="section">
<h3><?php echo $event['name'][1]; ?></h3>
<div class="price"><?php echo $event['price'][1]; ?></div>
<div class="price"><?php echo $event['s-price'][1]; ?></div>
<div class="description"><?php echo $event['description'][1]; ?></div>
<div class="options"><?php echo $event['options'][1]; ?></div>
<div class="price"><?php echo $event['o-price'][1]; ?></div>
</div>
<?php } ?>
<?php endwhile; else: ?>
<p>Error Message</p>
<?php endif; ?>
I would really appreciate some help please! I don’t think I will be able to solve this on my own!?
Thank you
- The topic ‘Magic fields duplicate groups over 2 columns’ is closed to new replies.