PageRenderTime 58ms CodeModel.GetById 28ms RepoModel.GetById 1ms app.codeStats 0ms

/blog/wp-content/themes/inuit-types/index.php

https://bitbucket.org/sergiohzlz/reportaprod
PHP | 135 lines | 70 code | 61 blank | 4 comment | 23 complexity | 24f683f241e59dc550cbd8111c7b2822 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 Inuit Types
  5. */
  6. ?>
  7. <?php get_header(); ?>
  8. <?php inuit_types_intro(); ?>
  9. <?php if ( is_paged() ) : ?>
  10. <div id="nav-above" class="navigation">
  11. <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">&larr;</span> Older posts', 'theme' )); ?></div>
  12. <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">&rarr;</span>', 'theme' )); ?></div>
  13. </div><!-- #nav-below -->
  14. <?php endif; ?>
  15. <div class="fix"></div>
  16. <div class="<?php if (is_paged() || get_option('inuitypes_one_column_posts')) { echo 'full_posts'; } else { echo 'boxed_posts'; } ?> <?php if (is_paged() || get_option('inuitypes_one_column_featposts')) { echo 'full_featposts'; } else { echo 'boxed_featposts'; } ?> blog">
  17. <?php if (have_posts()) : $count = 0; ?>
  18. <?php while (have_posts()) : the_post(); $postcount++;?>
  19. <!-- Featured Posts: START -->
  20. <?php if ( $postcount <= get_option('inuitypes_featured_entries') && ! is_paged() ) { ?>
  21. <div class="featured_post feat_background fl">
  22. <?php if ( get_option( 'inuitypes_one_column_featposts' ) && has_post_thumbnail() && ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail') ) &&
  23. $image[1] >= 600 ) : ?>
  24. <a title="<?php _e( 'Link to ', 'it' ); ?><?php the_title_attribute(); ?>" href="<?php the_permalink() ?>"><?php the_post_thumbnail( 'one-column-feature' ); ?></a>
  25. <span class="date_bg"><?php the_time( get_option( "date_format" ) ); ?></span>
  26. <?php elseif ( ! get_option( 'inuitypes_one_column_featposts' ) && has_post_thumbnail() && ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail') ) &&
  27. $image[1] >= 278 ) : ?>
  28. <a title="<?php _e( 'Link to ', 'it' ); ?><?php the_title_attribute(); ?>" href="<?php the_permalink() ?>"><?php the_post_thumbnail( 'two-column-feature' ); ?></a>
  29. <span class="date_bg"><?php the_time( get_option( "date_format" ) ); ?></span>
  30. <?php endif; ?>
  31. <div class="featured_content">
  32. <h2>
  33. <a title="<?php _e( 'Permanent link to ', 'it' ); ?><?php the_title_attribute(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
  34. <span class="comments-feat">- <?php comments_popup_link('0', '1', '%'); ?></span>
  35. </h2>
  36. </div>
  37. <div class="fix"></div>
  38. </div>
  39. <?php continue; } ?>
  40. <!-- Split between Featured entries and Rest: START -->
  41. <?php if (( get_option('inuitypes_featured_entries') + 1) == $postcount && ! is_paged() ) { ?>
  42. <div class="fix"><!----></div>
  43. <div class="hr-border"><!----></div>
  44. <?php } ?>
  45. <!-- Split between Featured entries and Rest: END -->
  46. <!-- Featured Posts: END -->
  47. <!-- Rest of Entries: START -->
  48. <div class="post">
  49. <h2><a title="<?php _e( 'Permanent link to ', 'it' ); ?><?php the_title_attribute(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  50. <div class="date-comments">
  51. <p class="fl"><em><?php the_time( get_option( "date_format" ) ); ?></em></p>
  52. <p class="fr"><span class="comments"><?php comments_popup_link('0', '1', '%'); ?></span></p>
  53. </div>
  54. <div class="fix"></div>
  55. <?php if ( has_post_thumbnail() ) : ?>
  56. <a title="<?php _e( 'Link to ', 'it' ); ?><?php the_title_attribute(); ?>" href="<?php the_permalink() ?>"><?php the_post_thumbnail( 'it-thumbnail' ); ?></a>
  57. <?php endif; ?>
  58. <p><?php echo inuit_types_excerpt( get_the_excerpt(), get_permalink() ); ?></p>
  59. <?php the_tags('<div class="tags">' . __( 'Tagged: ', 'it' ) . '<em>', ', ', '</em></div>'); ?>
  60. <div class="categories"><?php _e( 'Posted in: ', 'it' ); ?><em><?php the_category(', ') ?></em></div>
  61. </div>
  62. <!-- Rest of Entries: END -->
  63. <?php if (!get_option('inuitypes_one_column_posts')) { $count++; if ($count == 2) { $count = 0; ?><div class="fix"></div><?php } } ?>
  64. <?php endwhile; ?>
  65. <?php endif; ?>
  66. <div class="fix"></div>
  67. <div id="nav-below" class="navigation">
  68. <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">&larr;</span> Older posts', 'theme' )); ?></div>
  69. <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">&rarr;</span>', 'theme' )); ?></div>
  70. </div><!-- #nav-below -->
  71. </div>
  72. </div>
  73. <?php get_sidebar(); ?>
  74. <?php get_footer(); ?>