Advertisement
Guest User

Raindrops loop.php

a guest
Sep 5th, 2011
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.25 KB | None | 0 0
  1. <?php
  2. /**
  3. * The xhtml1.0 transitional header for our theme.
  4. *
  5. * Displays all of the <head> section and everything up till <div id="bd">
  6. *
  7. * @package WordPress
  8. * @subpackage Raindrops
  9. * @since Raindrops 0.1
  10. */
  11. ?>
  12. <?php
  13. /**
  14. * Display navigation to next/previous pages when applicable
  15. */
  16. $ht_deputy = "NoTitle";
  17.  
  18. if ( $wp_query->max_num_pages > 1 ){ ?>
  19.  
  20. <div id="nav-above" class="clearfix"> <span class="nav-previous">
  21. <?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'Raindrops' ) ); ?></span><span class="nav-next">
  22. <?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'Raindrops' ) ); ?></span></div>
  23. <?php }
  24.  
  25.  
  26. if(have_posts()){
  27.  
  28. /**
  29. * echo title Archive ,Author,etc
  30. *
  31. *
  32. *
  33. *
  34. */
  35.  
  36. raindrops_loop_title();
  37.  
  38.  
  39. /**
  40. * entry loop start
  41. *
  42. *
  43. *
  44. *
  45. */
  46. while (have_posts()){
  47.  
  48. the_post();
  49. ?>
  50. <?php comments_popup_link('Leave a Comment', '1 Comment', '% Comments'); ?>
  51. <li>
  52. <div id="post-<?php echo $post->ID; ?>" <?php post_class(); ?>>
  53. <?php if( in_category( "gallery" )){ ?>
  54. <h2 class="h2 entry-title"> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php echo esc_html(raindrops_blank_fallback(get_the_title(), $ht_deputy)); ?></a> </h2>
  55. <div class="posted-on">
  56. <?php raindrops_posted_on();?>
  57. </div>
  58. <div class="entry-content clearfix">
  59. <?php
  60. $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) );
  61.  
  62. $total_images = count( $images );
  63. $image = array_shift( $images );
  64. $attachment_page = $image->post_title;
  65. ?>
  66. <div class="gallery-thumb"><?php echo wp_get_attachment_link( $image->ID ,array(150,150),true); ?></div>
  67. <?php
  68. if(RAINDROPS_USE_LIST_EXCERPT == true){
  69. the_excerpt();
  70. }else{
  71. the_content();
  72. }
  73. ?>
  74. <br class="clear" />
  75. <p style="margin:1em;"><em><?php printf( __( 'This gallery contains %1$s photos.', 'Raindrops' ),$total_images); ?></em></p>
  76. <div class="entry-meta">
  77. <?php raindrops_posted_in();?>
  78. <?php edit_post_link( __( 'Edit', 'Raindrops' ), '<span class="edit-link">', '</span>' ); ?>
  79.  
  80. </div>
  81. </div>
  82. <?php //end entry-content?>
  83. <?php
  84. }elseif(in_category( "blog" )){
  85. ?>
  86. <h2 class="h2 entry-title">
  87. <?php
  88. if( has_post_thumbnail($post->ID)){
  89. echo '<span class="h2-thumb">';
  90. the_post_thumbnail();
  91. echo '</span>';
  92. }
  93. ?>
  94. <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf( esc_attr__( 'Permalink to %s', 'Raindrops' ), the_title_attribute( 'echo=0' ) ); ?>"><?php echo esc_html(raindrops_blank_fallback(get_the_title(), $ht_deputy)); ?></a> </h2>
  95. <div class="posted-on">
  96. <?php raindrops_posted_on();?>
  97. </div>
  98. <div class="entry-content">
  99. <ul class="left entry-meta-list categoryblog">
  100. <li class="avatar"><?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'raindrops_author_bio_avatar_size', 60 ) ); ?></li>
  101. <li class="author">
  102. <?php
  103. printf( '<span class="author vcard"><a class="url fn n" href="%1$s" rel="vcard:url">%2$s</a></span>',
  104. get_author_posts_url( get_the_author_meta( 'ID' ) ),
  105. get_the_author()
  106. );
  107. ?>
  108. </li>
  109. <?php dynamic_sidebar('sidebar-5');?>
  110. </ul>
  111. <?php
  112. if(RAINDROPS_USE_LIST_EXCERPT == true){
  113. the_excerpt();
  114. }else{
  115. the_content();
  116. }
  117. ?>
  118. </div>
  119. <br class="clear" />
  120. <div class="entry-meta">
  121. <?php raindrops_posted_in();?>
  122. <?php edit_post_link( __( 'Edit', 'Raindrops' ), '<span class="edit-link">', '</span>' ); ?>
  123. </div>
  124. <?php }else{ ?>
  125. <h2 class="h2 entry-title">
  126. <?php
  127. if( has_post_thumbnail($post->ID)){
  128. echo '<span class="h2-thumb">';
  129. the_post_thumbnail(array(48,48),array("style"=>"vertical-align:text-bottom;"));
  130. echo '</span>';
  131. }
  132. ?>
  133. <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf( esc_attr__( 'Permalink to %s', 'Raindrops' ), the_title_attribute( 'echo=0' ) ); ?>"><?php echo esc_html(raindrops_blank_fallback(get_the_title(), $ht_deputy)); ?></a></h2>
  134. <div class="posted-on">
  135. <?php raindrops_posted_on();?>
  136. </div>
  137. <div class="entry-content clearfix">
  138. <?php
  139. if(RAINDROPS_USE_LIST_EXCERPT == true){
  140. the_excerpt();
  141. }else{
  142. the_content();
  143. }
  144. ?>
  145. </div>
  146. <div class="entry-meta">
  147. <?php raindrops_posted_in();?>
  148. <?php edit_post_link( __( 'Edit', 'Raindrops' ), '<span class="edit-link">', '</span>' ); ?>
  149. </div>
  150. <?php } ?>
  151. <br class="clear" />
  152. </div>
  153. </li>
  154. <?php
  155. } //end while
  156. ?>
  157. </ul>
  158. <?php if ( $wp_query->max_num_pages > 1 ){ ?>
  159. <div id="nav-below" class="clearfix"> <span class="nav-previous">
  160. <?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'Raindrops' ) ); ?>
  161. </span><span class="nav-next">
  162. <?php previous_posts_link( __( '<span>Newer posts <span class="meta-nav">&rarr;</span></span>', 'Raindrops' ) ); ?>
  163. </span></div>
  164. <?php }//if have_posts?>
  165. <?php
  166. }
  167. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement