Title: CPT List Column Issue
Last modified: August 31, 2016

---

# CPT List Column Issue

 *  Resolved [BPAG News](https://wordpress.org/support/users/bpag-news/)
 * (@bpag-news)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/cpt-list-column-issue/)
 * *disclaimer, I am a novice*
 * I have a page that lists the titles of a particular CPT in two columns and everything
   was fine until last week when the two columns became divided, instead of on parallel
   rows. I tried wrapping the columns and that didn’t work, and couldn’t find a 
   solution online.
 * page of issue (scroll down to see): [http://www.bosepublicaffairs.com/clients/](http://www.bosepublicaffairs.com/clients/)
 * Any suggestions on where the code is messed up (see below)?
 * > `<section class=”all-clients centered-container”>
   >  <div class=”centered-content”>
   >  <p style=”font-size: 16px; text-align: left;”><strong>Bose Public Affairs 
   > Group Full Client List</strong></p>
   >  <a name=”clients-list” title=”list of all clients for Bose Public Affairs 
   > Group”></a>
   >  <?php $query = new WP_Query(array ( ‘posts_per_page’ => ‘-1′,’post_type’ =
   > > ‘client’, ‘orderby’=>’title’, ‘order’ =>’ASC’ ));
   >  if($query->have_posts()): $totalPosts = $query->post_count; $currentPost =
   > 0; $halfPosts = $totalPosts/2; ?>
   >  <div class=”clients-left”>
   >  <ul>
   >  <?php while ($query->have_posts()) : $query->the_post(); ?>
   >  <?php if($currentPost <= $halfPosts) : ?>
   >  <?php if(get_field(‘show_case_study_information’)) : ?>
   >  <li><a href=”<?php the_permalink(); ?>” title=”Learn more about <?php the_title();?
   > >”><?php the_title(); ?></a></li>
   >  <?php else: ?>
   >  <li><?php the_title(); ?></li>
   >  <?php endif; ?>
   >  <?php else: ?>
   >  <?php endif; ?>
   >  <?php $currentPost++; ?>
   >  <?php endwhile; ?>
   >  </ul>
   >  </div>
   >  <?php endif; ?>
   >  <?php wp_reset_postdata(); ?>
   >  <?php $query = new WP_Query(array ( ‘posts_per_page’ => ‘-1′,’post_type’ =
   > > ‘client’, ‘orderby’=>’title’, ‘order’ =>’ASC’ ));
   >  if($query->have_posts()): $totalPosts = $query->post_count; $currentPost =
   > 0; $halfPosts = $totalPosts/2; ?>
   >  <div class=”clients-right”> <ul>
   >  <?php while ($query->have_posts()) : $query->the_post(); ?>
   >  <?php if($currentPost > $halfPosts) : ?>
   >  <?php if(get_field(‘show_case_study_information’)) : ?>
   >  <li><a href=”<?php the_permalink(); ?>” title=”Learn more about <?php the_title();?
   > >”><?php the_title(); ?></a></li>
   >  <?php else: ?>
   >  <li><?php the_title(); ?></li>
   >  <?php endif; ?>
   >  <?php else: ?>
   >  <?php endif; ?>
   >  <?php $currentPost++;?>
   >  <?php endwhile; ?>
   >  </ul>
   >  </div>
   >  <?php endif; ?>
   >  <?php wp_reset_postdata(); ?>
   >  </div>
   >  </div>
   >  </sections>`
 * [https://wordpress.org/plugins/custom-post-type-ui/](https://wordpress.org/plugins/custom-post-type-ui/)

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [10 years, 2 months ago](https://wordpress.org/support/topic/cpt-list-column-issue/#post-7080330)
 * I wager the code is fine, but you have a 150px margin-left being applied to it
   on this selector:
 * div.subpage.clients section.all-clients div.clients-right { float: right; margin-
   left: 150px; text-align: left; }
 * [http://www.bosepublicaffairs.com/wp-content/themes/bose-public-affairs/library/css/style.css](http://www.bosepublicaffairs.com/wp-content/themes/bose-public-affairs/library/css/style.css)
   line 1191

Viewing 1 replies (of 1 total)

The topic ‘CPT List Column Issue’ is closed to new replies.

 * ![](https://ps.w.org/custom-post-type-ui/assets/icon-256x256.png?rev=2744389)
 * [Custom Post Type UI](https://wordpress.org/plugins/custom-post-type-ui/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-post-type-ui/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-post-type-ui/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-post-type-ui/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-post-type-ui/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-post-type-ui/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/cpt-list-column-issue/#post-7080330)
 * Status: resolved