PageRenderTime 54ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/blog/wp-content/themes/k2/theloop.php

https://bitbucket.org/sergiohzlz/reportaprod
PHP | 116 lines | 79 code | 35 blank | 2 comment | 13 complexity | 7bba086888065a77918ea5a6969023e8 MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0, AGPL-1.0, LGPL-2.1
  1. <?php /* Headlines for archives */ if ((!is_single() and !is_home()) or is_paged()) { ?>
  2. <h2>
  3. <?php // Figure out what kind of page is being shown
  4. if (is_category()) {
  5. if ($cat != $k2asidescategory) {
  6. printf(__('Archive for the \'%s\' Category','k2_domain'), single_cat_title('', false));
  7. } else {
  8. single_cat_title();
  9. }
  10. } elseif( is_tag() ) {
  11. printf(__("Posts Tagged '%s'"), single_tag_title('', false) );
  12. } elseif (is_day()) {
  13. printf(__('Archive for %s','k2_domain'), get_the_time(__('F jS, Y','k2_domain')));
  14. } elseif (is_month()) {
  15. printf(__('Archive for %s','k2_domain'), get_the_time(__('F, Y','k2_domain')));
  16. } elseif (is_year()) {
  17. printf(__('Archive for %s','k2_domain'), get_the_time(__('Y','k2_domain')));
  18. } elseif (is_search()) {
  19. printf(__('Search Results for \'%s\'','k2_domain'), get_search_query());
  20. } elseif (function_exists('is_tag') and is_tag()) {
  21. printf(__('Tag Archive for \'%s\'','k2_domain'), get_query_var('tag') );
  22. } elseif (is_paged() and ($paged > 1)) {
  23. printf(__('Archive Page %s','k2_domain'), $paged );
  24. } ?>
  25. </h2>
  26. <?php } ?>
  27. <?php if (!is_single() and !is_home() and is_paged()) include (TEMPLATEPATH . '/navigation.php'); ?>
  28. <?php is_tag(); ?>
  29. <?php /* Check if there are posts */
  30. if ( have_posts() ) {
  31. // Get the user information
  32. get_currentuserinfo();
  33. global $user_level;
  34. // Post index for semantic classes
  35. $post_index = 1;
  36. ?>
  37. <?php /* Start the loop */
  38. while ( have_posts() ) {
  39. the_post();
  40. ?>
  41. <?php /* Permalink nav has to be inside loop */ if (is_single()) include (TEMPLATEPATH . '/navigation.php'); ?>
  42. <?php /* Only display asides if sidebar asides are not active */ if(!$post_asides || $k2asidescheck == '0') { ?>
  43. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  44. <div class="entry-head">
  45. <h3 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php echo esc_attr( sprintf( __( 'Permanent link to %s', 'k2_domain' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php the_title(); ?></a></h3>
  46. <small class="entry-meta">
  47. <span class="chronodata">
  48. <?php /* Date & Author */
  49. printf( __('Published %1$s','k2_domain'),
  50. '<abbr class="published" title="'. get_the_time('Y-m-d\TH:i:sO') . '">' .
  51. get_the_time(get_option('date_format'))
  52. . '</abbr>'
  53. );
  54. ?>
  55. </span>
  56. <span class="entry-category"> <?php the_category(' , '); ?></span>
  57. <?php /* Comments */ comments_popup_link(__('Leave a&nbsp;<span>Comment</span>','k2_domain'), __('1&nbsp;<span>Comment</span>','k2_domain'), __('%&nbsp;<span>Comments</span>','k2_domain'), 'commentslink', '<span class="commentslink">'.__('Closed','k2_domain').'</span>'); ?>
  58. <?php /* Edit Link */ edit_post_link(__('Edit','k2_domain'), '<span class="entry-edit">','</span>'); ?>
  59. <br /><?php the_tags(__('Tags: '), ', ', '<br />'); ?>
  60. </small> <!-- .entry-meta -->
  61. </div> <!-- .entry-head -->
  62. <div class="entry-content">
  63. <?php
  64. the_content(__('Continue reading','k2_domain') . " '" . the_title('', '', false) . "'");
  65. ?>
  66. <?php link_pages('<p><strong>'.__('Pages:','k2_domain').'</strong> ', '</p>', 'number'); ?>
  67. </div> <!-- .entry-content -->
  68. <div class="clear"></div>
  69. </div> <!-- #post-ID -->
  70. <?php } /* End sidebar asides test */ ?>
  71. <?php } /* End The Loop */ ?>
  72. <?php /* If there is nothing to loop */ } else { $notfound = '1'; ?>
  73. <div class="hentry four04">
  74. <div class="entry-head">
  75. <h3 class="center"><?php _e('Not Found','k2_domain'); ?></h2>
  76. </div>
  77. <div class="entry-content">
  78. <p><?php _e('Oh no! You\'re looking for something which just isn\'t here! Fear not however, errors are to be expected, and luckily there are tools on the sidebar for you to use in your search for what you need.','k2_domain'); ?></p>
  79. </div>
  80. </div> <!-- .hentry .four04 -->
  81. <?php } /* End Loop Init */ ?>