1. <?php get_header(); ?>
  2.  
  3. <!-- begin colleft -->
  4.                 <div id="colLeft">
  5.                 <div id="colLeftInner" class="clearfix">
  6.                     <!-- begin fetured post -->
  7.                  <?php query_posts('tag=featured');?>
  8.                      <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  9.                     <div id="featuredPost">
  10.                         <span class="label">FEATURED POST</span>
  11.                         <h1><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1>
  12.                         <div class="meta">
  13.                             By <span class="author"><?php the_author_link(); ?></span> &nbsp;//&nbsp;  <?php the_category(', ') ?>  &nbsp;//&nbsp;  <?php comments_popup_link('No Comments', '1 Comment ', '% Comments'); ?>
  14.                         </div>
  15.                         <div class="featuredDetails"><?php the_excerpt()?>
  16.                         <?php $featured_img = get_post_meta($post->ID, 'featured_img', $single = true); ?>
  17.                         <a href="<?php the_permalink(); ?>"><img src="<?php echo $featured_img ?>" border="0" alt="<?php the_title(); ?>" /></a>
  18.                         </div>
  19.                     </div>
  20.                     <!-- end featured post -->
  21.                    <?php endwhile; ?>
  22.                         <?php else : ?>
  23.                     <?php endif; ?>
  24.                    
  25.                     <?php wp_reset_query(); // for pagination ?>
  26.                    
  27. <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; // for pagination ?>             
  28.                    
  29.                     <?php $posts_query = new WP_Query($query_string.'&tag=homepost&posts_per_page=-1&paged='.$paged);
  30.                           if(!$posts_query -> have_posts()){
  31.                               $latestposts_no = get_option('designpile_latest_posts');
  32.                               if($latestposts_no != null){
  33.                                  $posts_query = new WP_Query($query_string.'&posts_per_page='.$latestposts_no.'&paged='.$paged);
  34.                               }else{
  35.                                  $posts_query = new WP_Query($query_string.'&posts_per_page=6&paged='.$paged);
  36.                               }
  37.                           }
  38.                           $odd_or_even = 'odd'; ?>
  39.                         <?php if ($posts_query -> have_posts()) : while ($posts_query -> have_posts()) : $posts_query -> the_post();  ?>
  40.                         <div class="homePost <?php echo $odd_or_even; ?>">
  41.                             <div class="date"><?php the_time('M') ?><br /><span><?php the_time('j') ?></span></div>
  42.                              <div class="meta">
  43.                                 By <span class="author"><?php the_author_link(); ?></span> &nbsp;//&nbsp;  <?php comments_popup_link('No Comments', '1 Comment ', '% Comments'); ?>
  44.                             </div>
  45.                             <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
  46.                            
  47.                             <div><a href="#"><img src="<?php if ( function_exists('p75GetThumbnail') )echo p75GetThumbnail($post->ID); ?>" alt="" /></a><?php the_excerpt(); ?> </div>
  48.                         </div>
  49.                         <?php $odd_or_even = ('odd'==$odd_or_even) ? 'even' : 'odd'; ?>
  50.                         <?php endwhile; ?>
  51.                        
  52.                    
  53.                         <?php else : ?>
  54.                    
  55.                             <p>Sorry, but you are looking for something that isn't here.</p>
  56.                    
  57.                         <?php endif; ?>
  58.                    
  59.                    
  60.                      </div>
  61.                     <!-- end colleftInner -->
  62.     <div class="navigation">
  63.         <div class="alignleft"><?php next_posts_link('&laquo; Older Entries'); // pagination ?></div>
  64.         <div class="alignright"><?php previous_posts_link('Newer Entries &raquo;'); // pagination ?></div>
  65.     </div>
  66.                 </div>
  67.             <!-- end colleft -->
  68.             <?php get_sidebar(); ?>
  69.            
  70. <?php get_footer(); ?>