Colums and custom post type help
-
Hi All,
Having a little trouble and was wondering if anyone could point me in the right direction.
I am wanting to show results in column format from a specific custom taxonomy within a custom post type using the following code, it is just about working but is only showing half of the posts from the requested taxonomy. Any idea where I am going wrong?
I am using the plugin ‘Advanced Custom Fields V4.1.6’
Cheers 🙂
<?php query_posts( array( 'post_type' => 'stockist_directory', 'regions' => 'metropolitan' ) ); if (have_posts()) : while(have_posts()) : $i++; if(($i % 2) == 100) : $wp_query->next_post(); else : the_post(); ?> <div id="left-column"> <div id="listing"> <h1><?php the_title(); ?></h1> <?php the_field('shop_address'); ?><br/> <?php the_field('suburb'); ?>, <?php the_field('postcode'); ?><br/> Phone: <?php the_field('phone_number'); ?><br/> <a href="<?php the_field('website_address'); ?>">Website</a> </div> </div> <?php endif; endwhile; else: ?> <?php endif; ?> <?php $i = 0; rewind_posts(); ?> <?php if (have_posts()) : while(have_posts()) : $i++; if(($i % 2) !== 100) : $wp_query->next_post(); else : the_post(); ?> <div id="right-column"> <div id="listing"> <h1><?php the_title(); ?></h1> <?php the_field('shop_address'); ?><br/> <?php the_field('suburb'); ?>, <?php the_field('postcode'); ?><br/> Phone: <?php the_field('phone_number'); ?><br/> <a href="<?php the_field('website_address'); ?>">Website</a> </div> </div> <?php endif; endwhile; else: ?> <?php endif; ?> <?php wp_reset_query(); ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Colums and custom post type help’ is closed to new replies.