PageRenderTime 42ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/themes/hero/loop.php

https://github.com/Bochet/festival_lgbt
PHP | 62 lines | 37 code | 25 blank | 0 comment | 11 complexity | b914bcbf843a397ddd94222985c0c0db MD5 | raw file
Possible License(s): GPL-2.0, AGPL-1.0, LGPL-2.1
  1. <?php /* If there are no posts to display, such as an empty archive page */ ?>
  2. <?php if ( ! have_posts() ) : ?>
  3. <h1><?php _e( 'Not Found', 'Hero' ); ?></h1>
  4. <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'Hero' ); ?></p>
  5. <?php get_search_form(); ?>
  6. <?php endif; ?>
  7. <!--loop starts here-->
  8. <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
  9. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  10. <div class="post-head">
  11. <h1><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'Hero' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php if ( get_the_title() == '' ) { _e( '(No title)', 'Hero' ); } else { the_title(); } ?></a></h1>
  12. </div><!--post-heading end-->
  13. <div class="meta-data">
  14. <?php Hero_posted_on(); ?> in <?php the_category(', '); ?> | <?php comments_popup_link( __( 'Leave a comment', 'Hero' ), __( '1 Comment', 'Hero' ), __( '% Comments', 'Hero' ) ); ?>
  15. </div><!--meta data end-->
  16. <div class="clear"></div>
  17. <div class="post-entry">
  18. <?php if ( is_archive() || is_search() ) : ?>
  19. <?php the_content( __( '<span class="read-more">Read More</span>', 'Hero' ) ); ?>
  20. <div class="clear"></div>
  21. <?php wp_link_pages( array( 'before' => '' . __( 'Pages:', 'Hero' ), 'after' => '' ) ); ?>
  22. <?php else : ?>
  23. <?php if ( function_exists("has_post_thumbnail") && has_post_thumbnail() ) { the_post_thumbnail(array(620,240), array("class" => "alignleft post_thumbnail")); } ?>
  24. <?php the_content( __( '<span class="read-more">Read More</span>', 'Hero' ) ); ?>
  25. <div class="clear"></div>
  26. <?php wp_link_pages( array( 'before' => '' . __( 'Pages:', 'Hero' ), 'after' => '' ) ); ?>
  27. <?php endif; ?>
  28. <!--clear float--><div class="clear"></div>
  29. </div><!--post-entry end-->
  30. <?php comments_template( '', true ); ?>
  31. </div> <!--post end-->
  32. <?php endwhile; // End the loop. Whew. ?>
  33. <!--pagination-->
  34. <div class="navigation">
  35. <div class="alignleft"><?php next_posts_link( __( '&larr; Older posts', 'Hero' ) ); ?></div>
  36. <div class="alignright"><?php previous_posts_link( __( 'Newer posts &rarr;', 'Hero' ) ); ?></div>
  37. </div>