Advertisement
Guest User

blogstyle.php

a guest
Jun 20th, 2012
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.18 KB | None | 0 0
  1. <?php if (!is_search()) { ?>
  2.  
  3.     <?php if (is_category()) { ?>
  4.         <span class="current-category">
  5.             <?php single_cat_title(__('Currently Browsing: ','Influx'), 'display'); ?>
  6.         </span>
  7.     <?php }; ?>
  8.  
  9.     <?php if(is_home() && get_option('influx_blog_style') == 'on') { ?>
  10.         <?php $args=array(
  11.             'showposts'=>get_option('influx_homepage_posts'),
  12.             'paged'=>$paged,
  13.             'category__not_in' => get_option('influx_exlcats_recent'),
  14.         );
  15.         query_posts($args); ?>
  16.     <?php } else { ?>
  17.         <?php if (is_archive()) $post_number = get_option('influx_archivenum_posts');
  18.         if (is_tag()) $post_number = get_option('influx_tagnum_posts');
  19.         if (is_category()) $post_number = get_option('influx_catnum_posts');
  20.         global $query_string; query_posts($query_string . "&showposts=$post_number&paged=$paged"); ?>
  21.     <?php }; ?>
  22.    
  23. <?php } else { ?>
  24.  
  25.     <?php
  26.         $post_number = get_option('influx_searchnum_posts');
  27.         global $query_string;
  28.  
  29.         parse_str($query_string, $qstring_array);
  30.                    
  31.         $args = array('showposts' => $post_number,'paged'=>$paged);
  32.        
  33.         if ( isset($_GET['et_searchform_submit']) ) {          
  34.             $postTypes = array();
  35.             if ( !isset($_GET['et-inc-posts']) && !isset($_GET['et-inc-pages']) ) $postTypes = array('post');
  36.             if ( isset($_GET['et-inc-pages']) ) $postTypes = array('page');
  37.             if ( isset($_GET['et-inc-posts']) ) $postTypes[] = 'post';
  38.             $args['post_type'] = $postTypes;
  39.            
  40.             if ( $_GET['et-month-choice'] != 'no-choice' ) {
  41.                 $et_year = substr($_GET['et-month-choice'],0,4);
  42.                 $et_month = substr($_GET['et-month-choice'], 4, strlen($_GET['et-month-choice'])-4);
  43.                 $args['year'] = $et_year;
  44.                 $args['monthnum'] = $et_month;
  45.             }
  46.            
  47.             if ( $_GET['et-cat'] != 0 )
  48.                 $args['cat'] = $_GET['et-cat'];
  49.         }  
  50.        
  51.         $args = array_merge($args,$qstring_array);
  52.                    
  53.         query_posts($args);
  54.     ?>
  55.  
  56. <?php } ?> 
  57.    
  58. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  59.  
  60.     <div class="post-wrapper" style="margin-bottom: 15px !important;">
  61.         <?php include(TEMPLATEPATH . '/includes/share.php'); ?>
  62.        
  63.         <?php if (get_option('influx_thumbnails') == 'on') { ?>    
  64.             <?php $thumb = '';
  65.                   $width = 180;
  66.                   $height = 180;
  67.                   $classtext = 'no_border';
  68.                   $titletext = get_the_title();
  69.            
  70.                   $thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext,true);
  71.                   $thumb = $thumbnail["thumb"];
  72.                  
  73.                   if($thumb != '') { ?>
  74.                         <div class="thumbnail-div-2">
  75.                             <?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext , $width, $height, $classtext); ?>
  76.                         </div>
  77.                   <?php }; ?>
  78.         <?php }; ?>
  79.                
  80.         <h2 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s','Influx'), get_the_title()) ?>">
  81.             <?php the_title(); ?></a></h2>
  82.        
  83.         <?php include(TEMPLATEPATH . '/includes/postinfo.php'); ?>
  84.         <div style="clear: both;"></div>
  85.        
  86.         <?php the_content(); ?>
  87.         <div style="clear: both;"></div>   
  88.     </div>
  89. <?php endwhile; ?>
  90.     <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
  91.           else include(TEMPLATEPATH . '/includes/navigation.php'); ?>
  92.  
  93. <?php else : ?>
  94.     <?php include(TEMPLATEPATH . '/includes/no-results.php'); ?>
  95. <?php endif; wp_reset_query(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement