Guest User

home.php

a guest
Apr 14th, 2011
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 KB | None | 0 0
  1. s<?php get_header(); ?>
  2.  
  3. <?php include (TEMPLATEPATH . "/sidebar.php"); ?>
  4. <?php
  5. if ( $paged == 0 ) {
  6. $offset1 = 0;
  7. $offset2 = 2;
  8. } else {
  9. $off = $paged - 1;
  10. $offset1 = $off * 7;
  11. $offset2 = $off * 7 + 2;
  12. }
  13. ?>
  14. <!-- LOOP1 -->
  15. <?php if (have_posts()) : ?>
  16. <?php query_posts('posts_per_page=2&offset='.$offset1); ?>
  17. <?php while (have_posts()) : the_post(); ?>
  18. <div class="post two">
  19. <div class="sepia">
  20.  
  21. <?php
  22. if ( has_post_thumbnail() ) { ?>
  23. <?php
  24. $imgsrcparam = array(
  25. 'alt' => trim(strip_tags( $post->post_excerpt )),
  26. 'title' => trim(strip_tags( $post->post_title )),
  27. );
  28. $thumbID = get_the_post_thumbnail( $post->ID, 'two', $imgsrcparam ); ?>
  29. <div class="preview"><a href="<?php the_permalink() ?>"><?php echo "$thumbID"; ?></a></div>
  30.  
  31.  
  32. <?php } else {?>
  33. <div class="preview"><a href="<?php the_permalink() ?>"><img src="<?php bloginfo('template_url'); ?>/images/default-thumbnail.jpg" alt="<?php the_title(); ?>" /></a></div>
  34. <?php } ?>
  35.  
  36. </div><!-- .sepia -->
  37. <!-- Commenting out the title
  38.  
  39. <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
  40.  
  41. .sepia -->
  42.  
  43. <?php the_excerpt(); ?>
  44.  
  45.  
  46. <!-- no need to display time and category on home page
  47.  
  48. <div class="time"><?php the_time('M, d'); ?> &middot; in <?php the_category(','); ?></div>
  49.  
  50. -->
  51.  
  52. </div>
  53. <?php endwhile; ?>
  54. <?php else : ?>
  55. <?php endif; ?>
  56. <?php wp_reset_query(); ?>
  57. <!-- #LOOP1 -->
  58.  
  59. <!-- LOOP2 -->
  60. <?php if (have_posts()) : ?>
  61. <?php query_posts('posts_per_page=5&offset='.$offset2); ?>
  62. <?php while (have_posts()) : the_post(); ?>
  63. <div class="post one"<?php echo (is_home())? 'style="border-bottom: none !important;"' : ''; ?>>
  64. <div class="sepia">
  65.  
  66. <?php
  67. if ( has_post_thumbnail() ) { ?>
  68. <?php
  69. $imgsrcparam = array(
  70. 'alt' => trim(strip_tags( $post->post_excerpt )),
  71. 'title' => trim(strip_tags( $post->post_title )),
  72. );
  73. $thumbID = get_the_post_thumbnail( $post->ID, 'one', $imgsrcparam ); ?>
  74. <div class="preview"><a href="<?php the_permalink() ?>"><?php echo "$thumbID"; ?></a></div>
  75.  
  76.  
  77. <?php } else {?>
  78. <div class="preview"></div>
  79. <?php } ?>
  80.  
  81. </div><!-- .sepia -->
  82. <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
  83. <?php the_excerpt(); ?>
  84. <div class="time"><?php the_time('M, d'); ?></div>
  85. </div>
  86. <?php endwhile; ?>
  87. <?php else : ?>
  88. <?php endif; ?>
  89. <?php wp_reset_query(); ?>
  90. <!-- #LOOP2 -->
  91. <div style="clear: both;"></div>
  92.  
  93.  
  94.  
  95. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment