Advertisement
Guest User

TRBLOG

a guest
Feb 17th, 2012
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.67 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.             <div class="rightwidget">
  14.                                   <?php get_sidebar('right'); ?>
  15.                                  
  16.                                 </div>
  17.                 <div class="slider-item">
  18.                
  19.                     <?php while($featured_posts->have_posts()): $featured_posts->the_post(); ?>
  20.                     <?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'slider-image'); ?>
  21.                     <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>
  22.                     <?php endwhile; ?>
  23.                
  24.                 </div>
  25.  
  26.                                
  27.                
  28.                 <?php while($featured_posts->have_posts()): $featured_posts->the_post(); ?>
  29.                 <div id="htmlcaption_<?php echo $post->ID; ?>" class="slider-text nivo-html-caption">
  30.                 <span class="auth"><?php the_author_posts_link(); ?></span>
  31.                    
  32.                     <span class="date"><?php the_time('F d, Y'); ?></span>
  33. <span class="auth"><?php the_category(', '); ?></span>
  34.  
  35. <span class="commentscap"><?php comments_popup_link('0', '1', '%'); ?></span>
  36.                    
  37.                     <div class="slider-heading">
  38.                    
  39.                         <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
  40.                         <p><?php echo string_limit_words(get_the_excerpt(), 20); ?></p>
  41.                         <?php if(function_exists('kc_add_social_share')) kc_add_social_share(); ?>
  42.                     </div>
  43.                
  44.                 </div>
  45.                 <?php endwhile; ?>
  46.            
  47.             </div>
  48.             <?php endif; ?>
  49.            
  50.             <div id="items-wrapper">
  51.            
  52.                 <?php $count = 1; ?>
  53.                 <?php while(have_posts()): the_post(); ?>
  54.                 <?php if($count == 3): $count = 1; endif; if($count == 2): $class = 'last'; else: $class = ''; endif; ?>
  55.                 <div class="item <?php echo $class; ?>">
  56.                    
  57.                     <?php if(has_post_thumbnail()): ?>
  58.                     <div class="item-thumb">
  59.                         <?php
  60.                         if(has_post_format('video') || has_post_format('audio') || has_post_format('gallery')) {
  61.                             $icon = '<span class="thumb-icon ' . get_post_format($post->ID) . '"></span>';
  62.                         } else {
  63.                             $icon = '';
  64.                         }
  65.                         echo $icon;
  66.                         ?>
  67.                         <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail('archive-image'); ?></a>
  68.                         <span class="comments"><?php comments_popup_link('0', '1', '%'); ?></span>
  69.                         <?php if(get_post_meta($post->ID, 'pyre_overall_score', true)): ?>
  70.                         <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>
  71.                         <?php endif; ?>
  72.                     </div>
  73.                     <?php endif; ?>
  74.  
  75.                    
  76.                     <h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
  77.                     <span class="categorynew"><?php the_category(', '); ?></span><p><?php echo string_limit_words(get_the_excerpt(), 25); ?></p>
  78.                    
  79.                     <div class="item-meta">
  80. <span class="category">By <?php the_author_posts_link(); ?> </span>
  81.                         <span class="date">  on <?php the_time('F d, Y'); ?></span>
  82.  
  83. <br>
  84. <?php if(function_exists('kc_add_social_share')) kc_add_social_share(); ?>
  85.                        
  86.                     </div>
  87.                
  88.                 </div>
  89.                 <?php $count++; endwhile; ?>
  90.                
  91.             </div>
  92.            
  93.             <?php kriesi_pagination($pages = '', $range = 2); ?>
  94.  
  95.         </div>
  96.  
  97. <?php get_sidebar(); ?>
  98. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement