PageRenderTime 49ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/themes/simple-catch/content.php

https://github.com/Bochet/festival_lgbt
PHP | 69 lines | 48 code | 12 blank | 9 comment | 6 complexity | f6a466b54881dd053a3792bb9b000b9d MD5 | raw file
Possible License(s): GPL-2.0, AGPL-1.0, LGPL-2.1
  1. <?php
  2. /**
  3. * This is the template that displays content for index and archive page
  4. *
  5. * @package Catch Themes
  6. * @subpackage Simple_Catch
  7. * @since Simple Catch 1.3.2
  8. */
  9. ?>
  10. <?php if ( have_posts() ) :
  11. while( have_posts() ):the_post(); ?>
  12. <div <?php post_class(); ?> >
  13. <?php //If category has thumbnail it displays thumbnail and excerpt of content else excerpt only
  14. if ( has_post_thumbnail() ) : ?>
  15. <div class="col3 post-img">
  16. <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'simplecatch' ), the_title_attribute( 'echo=0' ) ); ?>"><?php the_post_thumbnail( 'featured' ); ?></a>
  17. </div> <!-- .col3 -->
  18. <div class="col5">
  19. <?php else : ?>
  20. <div class="col8">
  21. <?php endif; ?>
  22. <h2 class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'simplecatch' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark" ><?php the_title(); ?></a></h2>
  23. <ul class="post-by">
  24. <li class="no-padding-left"><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="<?php echo esc_attr(get_the_author_meta( 'display_name' ) ); ?>"><?php _e( 'By', 'simplecatch' ); ?>&nbsp;<?php the_author_meta( 'display_name' );?></a></li>
  25. <li><?php $simplecatch_date_format = get_option( 'date_format' ); the_time( $simplecatch_date_format ); ?></li>
  26. <li class="last"><?php comments_popup_link( __( 'No Comments', 'simplecatch' ), __( '1 Comment', 'simplecatch' ), __( '% Comments', 'simplecatch' ) ); ?></li>
  27. </ul>
  28. <?php the_excerpt(); ?>
  29. </div>
  30. <div class="row-end"></div>
  31. </div><!-- .post -->
  32. <hr />
  33. <?php endwhile;
  34. // Checking WP Page Numbers plugin exist
  35. if ( function_exists('wp_pagenavi' ) ) :
  36. wp_pagenavi();
  37. // Checking WP-PageNaviplugin exist
  38. elseif ( function_exists('wp_page_numbers' ) ) :
  39. wp_page_numbers();
  40. else:
  41. global $wp_query;
  42. if ( $wp_query->max_num_pages > 1 ) :
  43. ?>
  44. <ul class="default-wp-page">
  45. <li class="previous"><?php next_posts_link( __( 'Previous', 'simplecatch' ) ); ?></li>
  46. <li class="next"><?php previous_posts_link( __( 'Next', 'simplecatch' ) ); ?></li>
  47. </ul>
  48. <?php endif;
  49. endif;
  50. ?>
  51. <?php else : ?>
  52. <div class="post">
  53. <h2><?php _e( 'Not found', 'simplecatch' ); ?></h2>
  54. <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'simplecatch' ); ?></p>
  55. <?php get_search_form(); ?>
  56. </div><!-- .post -->
  57. <?php endif; ?>