Advertisement
Guest User

Untitled

a guest
Oct 20th, 2011
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.74 KB | None | 0 0
  1. <?php
  2. global $theme;
  3. $theme->hook('loop_before');
  4.  
  5. $get_post_elements = $theme->get_option($theme->options['template_part'] . '_post_elemnts');
  6. if (have_posts()) : while (have_posts()) : the_post();
  7. ?>
  8.  
  9. <div class="wrap-post">
  10. <?php $theme->hook('post_before'); ?>
  11.  
  12. <div <?php post_class('post clearfix'); ?> id="post-<?php the_ID(); ?>">
  13. <?php $theme->hook('post'); ?>
  14.  
  15. <?php if($theme->display('date', $get_post_elements) || $theme->display('author', $get_post_elements) || $theme->display('comments', $get_post_elements) || $theme->display('edit_link', $get_post_elements)) { ?>
  16.  
  17. <div class="postmeta-primary">
  18.  
  19. <?php if($theme->display('date',$get_post_elements)) {
  20. ?><span class="meta_date"><?php the_time($theme->get_option('dateformat')); ?></span><?php
  21. }
  22.  
  23. if($theme->display('author',$get_post_elements)) {
  24. ?> &nbsp; <span class="meta_author"><?php the_author(); ?></span><?php
  25. }
  26.  
  27. if($theme->display('comments', $get_post_elements) && comments_open( get_the_ID() )) {
  28. ?> &nbsp; <span class="meta_comments"><?php comments_popup_link( __( 'No comments', 'flexithemes' ), __( '1 Comment', 'flexithemes' ), __( '% Comments', 'flexithemes' ) ); ?></span><?php
  29. }
  30.  
  31. if($theme->display('edit_link', $get_post_elements)) {
  32. ?> &nbsp; <span class="meta_edit"><?php edit_post_link(); ?></span><?php
  33. } ?>
  34. </div>
  35. <?php } ?>
  36.  
  37. <h2 class="title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'flexithemes' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  38.  
  39. <div class="entry clearfix">
  40.  
  41. <?php
  42. if($theme->options['general']['featured_image'] && $theme->display('featured_image', $get_post_elements) && has_post_thumbnail()) {
  43. the_post_thumbnail(
  44. array($theme->get_option($theme->options['template_part'] . '_featured_image_width'), $theme->get_option($theme->options['template_part'] . '_featured_image_height')),
  45. array("class" => $theme->get_option($theme->options['template_part'] . '_featured_image_position') . " featured_image")
  46. );
  47. }
  48. ?>
  49.  
  50. <?php
  51. if($theme->get_option($theme->options['template_part'] . '_content_display') == 'excerpts') {
  52. echo '<p>' . $theme->shorten(get_the_excerpt(),$theme->get_option($theme->options['template_part'] . '_excerpts_length')) . '</p>';
  53. } else {
  54. the_content('');
  55. }
  56.  
  57. if (is_category( '327' )) {
  58. the_content();
  59. } else {
  60. the_excerpt();
  61. }
  62.  
  63. ?>
  64.  
  65. </div>
  66. <?php if($theme->display('categories', $get_post_elements) || $theme->display('tags', $get_post_elements)) { ?>
  67.  
  68. <div class="postmeta-secondary">
  69. <?php if($theme->display('categories', $get_post_elements)) {
  70. ?><span class="meta_categories"><?php _e( 'Posted in:', 'flexithemes' ); ?> <?php the_category(', '); ?></span><?php
  71. } if($theme->display('tags', $get_post_elements)) {
  72. if(get_the_tags()) {
  73. ?> &nbsp; <span class="meta_tags"><?php the_tags(__( 'Tags:', 'flexithemes') . ' ', ', ', ''); ?></span><?php
  74. }
  75.  
  76.  
  77. }
  78. ?>
  79. </div>
  80. <?php }
  81.  
  82. if($theme->display('readmore', $get_post_elements)) { ?>
  83.  
  84. <div class="wrap-readmore clearfix">
  85. <a class="readmore" href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'flexithemes' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php $theme->option($theme->options['template_part'] . '_read_more'); ?></a>
  86. </div>
  87. <?php } ?>
  88.  
  89. </div>
  90. <?php $theme->hook('post_after'); ?>
  91. </div><!-- Post ID <?php the_ID(); ?> -->
  92.  
  93. <?php endwhile; ?>
  94. <?php else : ?>
  95.  
  96. <div class="postwrap">
  97.  
  98. <div class="post">
  99.  
  100. <div class="entry">
  101.  
  102. <p><?php _e('No results were found for the requested archive. Perhaps searching will help find a related post.','flexithemes'); ?></p>
  103.  
  104. </div>
  105.  
  106. <div id="wrap-search">
  107.  
  108. <?php get_search_form(); ?>
  109.  
  110. </div>
  111.  
  112. </div>
  113.  
  114. </div>
  115. <?php endif;
  116.  
  117. if ( $wp_query->max_num_pages > 1 ) { ?>
  118.  
  119. <div class="navigation clearfix">
  120.  
  121. <?php
  122. if(function_exists('wp_pagenavi')) {
  123. wp_pagenavi();
  124. } else {
  125. ?><div class="alignleft"><?php next_posts_link( __( '<span>&laquo;</span> Older posts', 'flexithemes' ) );?></div>
  126. <div class="alignright"><?php previous_posts_link( __( 'Newer posts <span>&raquo;</span>', 'flexithemes' ) );?></div><?php
  127. } ?>
  128.  
  129. </div><!-- .navigation .clearfix -->
  130. <?php }
  131.  
  132. wp_reset_query();
  133. $theme->hook('loop_after');
  134. ?>
  135.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement