Regarding the use of query_posts, as @epilektric said never use it. Use WP_Query
instead.
Another consideration is to keep your code DRY.
What I suggest you is:
- Run the loop one time, and put the posts in a helper array, using 2 keys one for even one for odd.
- Cycle that array and output the markup with a function.
Example:
function post_data_output( $post ) {
the_field('shop_address', $post->ID );
echo get_field('suburb', $post->ID) . ','. get_field('postcode', $post->ID) . '<br/>';
echo 'Phone:' . get_field('phone_number', $post->ID) . '<br/>';
echo '<a href="' . get_field('website_address', $post->ID). '">Website</a>';
}
$args = array( 'order' => 'ASC' , 'orderby' => 'title' , 'posts_per_page' => -1 , 'post_type' => 'stockist_directory', 'regions' => 'metropolitan' );
$query = new WP_Query($args);
if ($query->have_posts()) :
$ordered = array('even' => array(), 'odd' => array());
while($query->have_posts()) : $query->the_post();
global $post;
$key = ( $query->current_post % 2 == 0) ? 'even' : 'odd';
$ordered[$key][] = $post;
endwhile;
wp_reset_postdata();
echo '<div id="left-column">';
if ( ! empty($ordered['odd']) ) { foreach( $ordered['odd'] as $apost ) {
post_data_output($apost);
} }
echo '</div>';
echo '<div id="right-column">';
foreach( $ordered['even'] as $apost ) {
post_data_output($apost);
}
echo '</div>';
endif;