Advertisement
Guest User

Untitled

a guest
Jan 12th, 2014
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.64 KB | None | 0 0
  1. <?php get_header(); ?>
  2.            
  3.             <div class="content">
  4.                
  5.                 <?php
  6.                     if(hick_option('hick_widgets_categories')) :
  7.                     $hk_cats = hick_option('hick_widgets_categories');
  8.                     $hk_currentcats = $wp_query->get_queried_object_id();
  9.                    
  10.                     foreach ($hk_cats as $hk_cat) {
  11.                        
  12.                         if($hk_cat == $hk_currentcats) { ?>
  13.                        
  14.                             <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar("Main Widget Area")) : ?><?php endif; ?>
  15.                            
  16.                   <?php }
  17.                        
  18.                     }
  19.                    
  20.                     endif;
  21.  
  22.                 ?>
  23.                
  24.                 <?php if (have_posts()) : ?>
  25.  
  26.                 <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
  27.                 <?php /* If this is a category archive */ if (is_category()) { ?>
  28.                 <h2 class="content-heading"><?php _e('Browsing Category', 'hickory'); ?> <span class="thin"><?php single_cat_title(); ?></span></h2>
  29.                
  30.                 <?php } ?>
  31.                
  32.                 <ul class="newsfeed<?php if(hick_option('hickory_archive_layout') == 'hickory_archive_list') : echo ' classic'; endif; ?>">
  33.                
  34.                 <?php $hickory_count = 0; ?>
  35.                 <?php while (have_posts()) : the_post(); ?>
  36.                 <?php $hickory_count++; $third_div = ($hickory_count%3 == 0) ? 'last' : ''; ?>
  37.                
  38.                     <li<?php if(($third_div) == 'last') : ?> class="<?php echo $third_div; ?>"<?php endif; ?>>
  39.                    
  40.                     <div class="item">
  41.                            
  42.                         <div class="item-image">
  43.                        
  44.                         <?php if(hick_option('hickory_archive_layout') == 'hickory_archive_list') : ?>
  45.                            
  46.                             <?php if (  (function_exists('has_post_thumbnail')) && (has_post_thumbnail())  ) : ?>
  47.                                 <a href="<?php echo get_permalink() ?>" rel="bookmark"><?php the_post_thumbnail('list_thumb'); ?></a>
  48.                             <?php else : ?>
  49.                                 <a href="<?php echo get_permalink() ?>" rel="bookmark"><img src="<?php echo get_template_directory_uri(); ?>/img/list-default.png" alt="" /></a>
  50.                             <?php endif; ?>
  51.                            
  52.                         <?php else : ?>
  53.                        
  54.                             <?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) : ?>
  55.                                 <a href="<?php echo get_permalink() ?>" rel="bookmark"><?php the_post_thumbnail('newsfeed'); ?></a>
  56.                             <?php else : ?>
  57.                                
  58.                             <?php endif; ?>
  59.                            
  60.                         <?php endif; ?>
  61.                            
  62.                         <?php
  63.                             if (  (function_exists('has_post_thumbnail')) && (has_post_thumbnail())  ) {
  64.                                 if(vp_metabox('hickory_post.hickory_post_type') == 'video') {
  65.                                     echo '<a href="' . get_permalink() . '"><div class="item-image-icon video"></div></a>';
  66.                                 } elseif(vp_metabox('hickory_post.hickory_post_type') == 'gallery') {
  67.                                     echo '<a href="' . get_permalink() . '"><div class="item-image-icon gallery"></div></a>';
  68.                                 } elseif(vp_metabox('hickory_post.hickory_post_type') == 'review') {
  69.                                     echo '<div class="review-box"><span class="score">' . vp_metabox('hickory_post.review.0.overall_score') . '</span><span class="text">Score</span></div>';
  70.                                 } elseif(vp_metabox('hickory_post.hickory_post_type') == 'music') {
  71.                                     echo '<a href="' . get_permalink() . '"><div class="item-image-icon music"></div></a>';
  72.                                 }
  73.                             }
  74.                         ?>
  75.                            
  76.                         </div>
  77.                        
  78.                         <?php if(hick_option('hickory_archive_layout') == 'hickory_archive_list') : ?><div class="classic-content"><?php endif; ?>
  79.                         <span class="category">
  80.                             <?php
  81.                             $category = get_the_category(get_the_ID());
  82.                             if($category[0]){
  83.                                 echo '<a href="'.get_category_link($category[0]->term_id ).'">'.$category[0]->cat_name.'</a>';
  84.                             }
  85.                             ?>
  86.                         </span>
  87.                         <span class="item-comments"><?php comments_popup_link( 0, 1, '%', '', ''); ?></span>
  88.                         <h3><a href="<?php echo get_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
  89.                         <?php if(hick_option('hickory_archive_layout') == 'hickory_archive_list') : ?>
  90.  
  91.                             <p><?php echo hick_string_limit_words(get_the_excerpt(), 19); ?> ...</p>
  92.  
  93.                         <?php else : ?>
  94.                            
  95.                             <p><?php echo hick_string_limit_words(get_the_excerpt(), 28); ?> ...</p>
  96.                                
  97.                         <?php endif; ?>
  98.                         <span class="item_meta"><?php _e('On', 'hickory'); ?> <?php the_time( get_option('date_format') ); ?> <span class="line">/</span> <?php _e('By', 'hickory'); ?> <?php the_author_posts_link(); ?></span>
  99.                         <?php if(hick_option('hickory_archive_layout') == 'hickory_archive_list') : ?></div><?php endif; ?>
  100.                        
  101.                     </div>
  102.                    
  103.                     </li>
  104.                
  105.                 <?php endwhile; ?>
  106.                
  107.                 </ul>
  108.                
  109.                 <?php hick_pagination(); ?>
  110.                
  111.                 <?php else : ?>
  112.            
  113.                 <h2 class="content-heading"><?php _e('Sorry', 'hickory'); ?> <span class="thin"><?php _e('No posts in this category yet', 'hickory'); ?></span></h2>
  114.                
  115.                 <?php endif; ?>
  116.                    
  117.                
  118.            
  119.             </div>
  120.            
  121. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement