Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

kikimarie123 on "Separate list into two even columns"

$
0
0

I have an unordered list (of team members) that I want to automatically separate into two columns - even when new team members are added. Is there a way to do this? Here is my code:

<div class="team-list">
<?php $args = array(
	'posts_per_page'  => -1,
	'post_type' => 'team-members',
	'meta_query' => array(
		array(
			'key' => 'team_member_category',
			'value' => '"Alphabetical Listing"',
			'compare' => 'LIKE'
		)
	)
);
$the_query = new WP_Query( $args ); ?>
<?php if( $the_query->have_posts() ): ?>
	<ul>
	<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
                <li>
		<a href="<?php the_permalink() ?>" title="<?php printf(__('%s','rys'), get_the_title()) ?>" rel="bookmark" ><?php the_title(); ?></a>
		</li>
	<?php endwhile; ?>
	</ul>
<?php endif; ?>
<?php wp_reset_query();  // Restore global post data stomped by the_post(). ?>

</div><!--end .team-list -->

Help please!! :)


Viewing all articles
Browse latest Browse all 8245

Trending Articles