Advertisement
Guest User

FixedCodeForWPBlog

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