Archive for June, 2010

Just had my first taste of India….

I got to turn this:

<?php $i=1?>
                <?php query_posts('category_name=Projects2&showposts=3&orderby=rand'); ?>
                <?php while (have_posts()) : the_post(); ?>
               
                <?php if($i==1)
     {?>
      <div class="set set1">
    <div class="title"><h4><a href="<?php the_permalink();?>"><?php the_title();?></a></h4></div>
             <div class="content">
                               <a href="#">
                               <?php $values = get_post_custom_values("image"); ?>
                               <img src="<?php echo $values[0]; ?>" width="242" height="148" alt="">
                               </a>
         <!--content end--></div>
             <!--set set1 end--></div>
                       
                 <?php }
     elseif($i==2)
 {?>
                        <div class="set set1">
    <div class="title"><h4><a href="<?php the_permalink();?>"><?php the_title();?></a></h4></div>
             <div class="content">
                                <a href="#">
                                <?php $values = get_post_custom_values("image"); ?>
                                <img src="<?php echo $values[0]; ?>" width="242" height="148" alt="">
                                </a>
            <!--content end--></div>
                   <!--set set1 end--></div>
                       
                 <?php  }
elseif($i==3)
 {?>
                        <div class="set set1">
    <div class="title"><h4><a href="<?php the_permalink();?>"><?php the_title();?></a></h4></div>
             <div class="content">
                                <a href="#">
                                <?php $values = get_post_custom_values("image"); ?>
                                <img src="<?php echo $values[0]; ?>" width="242" height="148" alt="">
                                </a>
            <!--content end--></div>
                   <!--set set1 end--></div>
                       
                 <?php  }
     else
 {?>
                       <div class="set set1">
    <div class="title"><h4><a href="<?php the_permalink();?>"><?php the_title();?></a></h4></div>
             <div class="content">
                                <a href="#">
                                <?php $values = get_post_custom_values("image"); ?>
                               <img src="<?php echo $values[0]; ?>" width="242" height="148" alt="">
                                </a>
          <!--content end--></div>
                  <!--set set1 end--></div>
                       
                 <?php } ?>
                                 
                                   
                   <?php $i++; ?>
                  <?php endwhile; ?>
                  <?php wp_reset_query();?>

Into this:

<?php query_posts('category_name=Projects2&showposts=3&orderby=rand'); ?>
<?php while (have_posts()) : the_post(); ?>

<div class="set set1">
     <div class="title"><h4><a href="<?php the_permalink();?>"><?php the_title();?></a></h4></div>
     <div class="content">
     <a href="#">
     <?php $values = get_post_custom_values("image"); ?>
     <img src="<?php echo $values[0]; ?>" width="242" height="148" alt="">
     </a>
  </div><!--content end-->
</div><!--set set1 end-->

<?php endwhile; ?>
<?php wp_reset_query();?>

Needless to say, my client will no longer be outsourcing to India.

8 Comments