Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2011
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.06 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <div id="main">
  4.  
  5. <?php if(get_option('pyre_featured_slider') == 'On' && get_option('pyre_featured_tag')): ?>
  6. <?php
  7. $featured_posts = new WP_Query(array(
  8. 'showposts' => get_option('pyre_featured_posts'),
  9. 'tag' => get_option('pyre_featured_tag')
  10. ));
  11. ?>
  12. <div id="featured-wrapper">
  13.  
  14. <div class="slider-item">
  15.  
  16. <?php while($featured_posts->have_posts()): $featured_posts->the_post(); ?>
  17. <?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'slider-image'); ?>
  18. <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img src="<?php echo $image[0]; ?>" alt="<?php the_title(); ?>" title="#htmlcaption_<?php echo $post->ID; ?>"/></a>
  19. <?php endwhile; ?>
  20.  
  21. </div>
  22.  
  23. <?php while($featured_posts->have_posts()): $featured_posts->the_post(); ?>
  24. <div id="htmlcaption_<?php echo $post->ID; ?>" class="slider-text nivo-html-caption">
  25.  
  26. <span class="category"><?php the_category(', '); ?></span>
  27. <span class="date"><?php the_time('F d, Y'); ?></span>
  28.  
  29. <div class="slider-heading">
  30.  
  31. <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
  32. <p><?php echo string_limit_words(get_the_excerpt(), 40); ?></p>
  33.  
  34. </div>
  35.  
  36. </div>
  37. <?php endwhile; ?>
  38.  
  39. </div>
  40. <?php endif; ?>
  41.  
  42. <div id="items-wrapper">
  43.  
  44. <?php $count = 1; ?>
  45. <?php while(have_posts()): the_post(); ?>
  46. <?php if($count == 3): $count = 1; endif; if($count == 2): $class = 'last'; else: $class = ''; endif; ?>
  47. <div class="item <?php echo $class; ?>">
  48.  
  49. <?php if(has_post_thumbnail()): ?>
  50. <div class="item-thumb">
  51. <?php
  52. if(has_post_format('video') || has_post_format('audio') || has_post_format('gallery')) {
  53. $icon = '<span class="thumb-icon ' . get_post_format($post->ID) . '"></span>';
  54. } else {
  55. $icon = '';
  56. }
  57. echo $icon;
  58. ?>
  59. <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail('archive-image'); ?></a>
  60. <span class="comments"><?php comments_popup_link('0', '1', '%'); ?></span>
  61. <?php if(get_post_meta($post->ID, 'pyre_overall_score', true)): ?>
  62. <span class="item-review"><img src="<?php echo get_template_directory_uri(); ?>/images/stars/<?php echo get_post_meta($post->ID, 'pyre_overall_score', true); ?>.png" alt="<?php the_title(); ?> Overall Score" /></span>
  63. <?php endif; ?>
  64. </div>
  65. <?php endif; ?>
  66.  
  67.  
  68. <h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
  69. <?php the_content(); ?>
  70.  
  71. <div class="item-meta">
  72. <span class="date"><?php the_time('F d, Y'); ?></span>
  73. <span class="category"><?php the_category(', '); ?></span>
  74. </div>
  75.  
  76. </div>
  77. <?php $count++; endwhile; ?>
  78.  
  79. </div>
  80.  
  81. <?php kriesi_pagination($pages = '', $range = 2); ?>
  82.  
  83. </div>
  84.  
  85. <?php get_sidebar(); ?>
  86. <?php get_footer(); ?>
  87.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement