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

/blog/wp-content/themes/traction/index.php

https://bitbucket.org/sergiohzlz/reportaprod
PHP | 44 lines | 39 code | 1 blank | 4 comment | 7 complexity | 463aa926c3bb16dbb125045949df1f49 MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0, AGPL-1.0, LGPL-2.1
  1. <?php
  2. /**
  3. * @package WordPress
  4. * @subpackage Traction
  5. */
  6. get_header(); ?>
  7. <div id="main-top">
  8. <h4><?php _e( 'Recent Articles', 'traction' ); ?></h4>
  9. <?php get_template_part( 'subscribe' ); ?>
  10. </div>
  11. <div id="main" class="clear">
  12. <div id="content">
  13. <?php if (have_posts()) : ?>
  14. <?php while (have_posts()) : the_post(); ?>
  15. <?php $has_thumb = false; ?>
  16. <div id="post-<?php the_ID(); ?>" <?php post_class( 'clear' ); ?>>
  17. <div class="date">
  18. <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
  19. <div class="day"><?php the_time( __( 'j' ) ); ?></div>
  20. <div class="month"><?php the_time( __( 'M', 'traction' ) ); ?></div>
  21. </a>
  22. </div>
  23. <?php if ( has_post_thumbnail() && ( $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'index-thumb' ) ) && $image[1] >= '175' ) : ?>
  24. <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_post_thumbnail( 'index-thumb', array( 'class' => 'index-post-thm alignleft border' ) ); ?></a>
  25. <?php $has_thumb = true; ?>
  26. <?php endif; ?>
  27. <div class="entry<?php if ( ! $has_thumb ) echo ' nothumb'; ?>">
  28. <h2 class="title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
  29. <?php the_content( traction_read_more() ); ?>
  30. <?php edit_post_link( __( 'Edit', 'traction' ) ); ?>
  31. <?php wp_link_pages(); ?>
  32. </div><!--end entry-->
  33. </div><!--end post-->
  34. <?php endwhile; /* rewind or continue if all posts have been fetched */ ?>
  35. <div class="navigation index">
  36. <div class="alignleft"><?php next_posts_link( __( '&laquo; Older Entries', 'traction' ) ); ?></div>
  37. <div class="alignright"><?php previous_posts_link( __( 'Newer Entries &raquo;', 'traction' ) ); ?></div>
  38. </div><!--end navigation-->
  39. <?php else : ?>
  40. <?php endif; ?>
  41. </div><!--end content-->
  42. <?php get_sidebar(); ?>
  43. <?php get_footer(); ?>