Title: code problem
Last modified: August 18, 2016

---

# code problem

 *  [vaibhavs](https://wordpress.org/support/users/vaibhavs/)
 * (@vaibhavs)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/code-problem-1/)
 * Hey can any one find out whats the problem in this code.
 * this im trying to get the post in table form i.e right and left( default is down)
   on the index page.
 *     ```
       <div id="main">
   
       <?php if(have_posts()) : ?><?php $count=0; while (have_posts()) : the_post(); if(!($firstpost == $post->ID)) : ?>
   
       <?php if($count % 2 == 0) echo '<div style="float:left; width:200px; padding-right:25px; border-right:1px dashed #ccc">'; else echo '<div style="float:right;width:200px;">'; ?>
   
           <div class="post" id="post-<?php the_ID(); ?>">
   
       	<h2><a>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
       	<div class="entry">
       						<p class="entrymetadata">Posted by <?php the_author() ?> on <?php the_time('F jS, Y') ?> in <?php the_category(', ') ?> <?php edit_post_link('Edit', '| ', ''); ?></p>
   
                <?php the_content_rss('', TRUE, '', 30) ; ?>
   
       						<p class="comments_number"><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></p>
   
       	<!--
       	<?php trackback_rdf(); ?					-->
   
       					</div>
       				</div>
       ```
   

The topic ‘code problem’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [vaibhavs](https://wordpress.org/support/users/vaibhavs/)
 * Last activity: [18 years, 9 months ago](https://wordpress.org/support/topic/code-problem-1/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
