Advertisement
alchymyth

loop

Feb 21st, 2013
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.81 KB | None | 0 0
  1. <?php if ( have_posts() ) : ?>
  2.             <?php global $post; ?>
  3. <?php while( have_posts() ) : the_post(); ?>
  4. <?php if( $wp_query->current_post == 0 ) : //latest post// ?>
  5. <div class="post" id="post-<?php the_ID(); ?>">
  6. <?php the_post_thumbnail(); ?>
  7. <h1 class="posttitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h1>
  8. <div class="postmeta">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  </div>
  9.  
  10. <div class="entry">
  11. <?php the_content('<span>Read on &raquo;</span>'); ?>
  12. <!-- AddThis Button BEGIN -->
  13. <div class="addthis_toolbox addthis_default_style addthis_32x32_style">
  14. <a class="addthis_button_preferred_1"></a>
  15. <a class="addthis_button_preferred_2"></a>
  16. <a class="addthis_button_preferred_3"></a>
  17. <a class="addthis_button_preferred_4"></a>
  18. <a class="addthis_button_compact"></a>
  19. <a class="addthis_counter addthis_bubble_style"></a>
  20. </div>
  21. <script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
  22. <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5124ed6b2f85e2eb"></script>
  23. <!-- AddThis Button END --> <?php comments_popup_link('No Comments', 'Comment (1)', 'Comments (%)'); ?>
  24. </div>
  25. </div>
  26. <?php else : //all other posts// ?>
  27.  
  28. <div id="blog-excerpt">
  29. <?php the_post_thumbnail(); ?>
  30. <h1 class="posttitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h1>
  31. <div class="entry">
  32. <?php the_excerpt('<span>Read on &raquo;</span>'); ?>
  33. </div>
  34. <div class="postmeta">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <!-- AddThis Button BEGIN -->
  35. <div class="addthis_toolbox addthis_default_style addthis_32x32_style">
  36. <a class="addthis_button_preferred_1"></a>
  37. <a class="addthis_button_preferred_2"></a>
  38. <a class="addthis_button_preferred_3"></a>
  39. <a class="addthis_button_preferred_4"></a>
  40. <a class="addthis_button_compact"></a>
  41. <a class="addthis_counter addthis_bubble_style"></a>
  42. </div>
  43. <script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
  44. <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5124ed6b2f85e2eb"></script>
  45. <!-- AddThis Button END --><?php comments_popup_link('No Comments', 'Comment (1)', 'Comments (%)'); ?></div>
  46. </div>
  47. <?php endif; //ends the 'if( $wp_query->current_post == 0 )' statement// ?>
  48.  
  49. <?php endwhile; ?>
  50.  
  51.             <div class="navigation">
  52.                     <div id="next-ent"><?php next_posts_link('&laquo; Previous Entries') ?></div>
  53.                     <div id="prev-ent"><?php previous_posts_link('Next Entries &raquo;') ?></div>
  54.                 </div>
  55.  
  56.             </article><!-- #post-0 -->
  57.  
  58.         <?php endif; // end have_posts() check ?>
  59.  
  60.         </div><!-- #content -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement