Advertisement
Guest User

Untitled

a guest
Oct 13th, 2011
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.20 KB | None | 0 0
  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 $posts_query = new WP_Query($query_string.'tag=homepost&posts_per_page=-1');
  26. if(!$posts_query -> have_posts()){
  27. $latestposts_no = get_option('designpile_latest_posts');
  28. if($latestposts_no != null){
  29. $posts_query = new WP_Query($query_string.'posts_per_page='.$latestposts_no);
  30. }else{
  31. $posts_query = new WP_Query($query_string.'posts_per_page=6');
  32. }
  33. }
  34. $odd_or_even = 'odd'; ?>
  35. <?php if ($posts_query -> have_posts()) : while ($posts_query -> have_posts()) : $posts_query -> the_post(); ?>
  36. <div class="homePost <?php echo $odd_or_even; ?>">
  37. <div class="date"><?php the_time('M') ?><br /><span><?php the_time('j') ?></span></div>
  38. <div class="meta">
  39. By <span class="author"><?php the_author_link(); ?></span> &nbsp;//&nbsp; <?php comments_popup_link('No Comments', '1 Comment ', '% Comments'); ?>
  40. </div>
  41. <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
  42.  
  43. <div><a href="<?php the_permalink() ?>">
  44. <?php if(!has_post_thumbnail()){ ?>
  45. <img src="<?php bloginfo('template_directory'); ?>/images/no_thumb.jpg" alt="<?php the_title(); ?>" />
  46. <?php }else { the_post_thumbnail(); } ?></a>
  47. <?php the_excerpt(); ?>
  48. </div>
  49. </div>
  50. <?php $odd_or_even = ('odd'==$odd_or_even) ? 'even' : 'odd'; ?>
  51. <?php endwhile; ?>
  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.  
  63. </div>
  64. <!-- end colleft -->
  65. <?php get_sidebar(); ?>
  66.  
  67. <?php get_footer(); ?>
  68.  
  69.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement