Advertisement
Guest User

Untitled

a guest
Jun 1st, 2012
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.29 KB | None | 0 0
  1. <?php
  2. /**
  3. * Loop
  4. *
  5. * This is the default loop file, containing the looping logic for use in all templates
  6. * where a loop is required.
  7. *
  8. * To override this loop in a particular context (in all archives, for example), create a
  9. * duplicate of this file and rename it to `loop-archive.php`. Make any changes to this
  10. * new file and they will be reflected on all your archive screens.
  11. *
  12. * @package WooFramework
  13. * @subpackage Template
  14. */
  15. global $more; $more = 0;
  16.  
  17. woo_loop_before();
  18.  
  19. if (have_posts()) { $count = 0;
  20. ?>
  21.  
  22. <div class="fix"></div>
  23.  
  24. <?php
  25. while (have_posts()) { the_post(); $count++;
  26.  
  27. if ( is_home() && $count == 1 ) :
  28.  
  29. global $woo_options;
  30.  
  31. $title_before = '<h1 class="title">';
  32. $title_after = '</h1>';
  33.  
  34. if ( ! is_single() ) {
  35.  
  36. $title_before = '<h2 class="title">';
  37. $title_after = '</h2>';
  38.  
  39. $title_before = $title_before . '<a href="' . get_permalink( get_the_ID() ) . '" rel="bookmark" title="' . the_title_attribute( array( 'echo' => 0 ) ) . '">';
  40. $title_after = '</a>' . $title_after;
  41.  
  42. }
  43.  
  44. $page_link_args = apply_filters( 'woothemes_pagelinks_args', array( 'before' => '<div class="page-link">' . __( 'Pages:', 'woothemes' ), 'after' => '</div>' ) );
  45.  
  46. woo_post_before();
  47. ?>
  48. <div <?php post_class(); ?>>
  49. <?php
  50. woo_post_inside_before();
  51. if ( $woo_options['woo_post_content'] != 'content' AND !is_singular() )
  52. woo_image( 'width='.$woo_options['woo_thumb_w'].'&height='.$woo_options['woo_thumb_h'].'&class=thumbnail '.$woo_options['woo_thumb_align'] );
  53. the_title( $title_before, $title_after );
  54. woo_post_meta();
  55. ?>
  56. <div class="entry">
  57. <?php
  58. the_content(__('Continue Reading &rarr;', 'woothemes'));
  59. ?>
  60. </div><!-- /.entry -->
  61. <div class="fix"></div>
  62. <?php
  63. woo_post_inside_after();
  64. ?>
  65. </div><!-- /.post -->
  66. <?php
  67. woo_post_after();
  68. $comm = $woo_options[ 'woo_comments' ];
  69. if ( ( $comm == 'post' || $comm == 'both' ) && is_single() ) { comments_template(); }
  70. ?>
  71.  
  72. <?php else :
  73.  
  74. woo_get_template_part( 'content', get_post_type() );
  75.  
  76. endif;
  77.  
  78. } // End WHILE Loop
  79. } else {
  80. get_template_part( 'content', 'noposts' );
  81. } // End IF Statement
  82.  
  83. woo_loop_after();
  84.  
  85. woo_pagenav();
  86. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement