Advertisement
Guest User

Untitled

a guest
Jun 8th, 2012
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. <?php
  2. get_header();
  3. get_sidebar();
  4.  
  5. //OptionTree Stuff
  6. if ( function_exists( 'get_option_tree') ) {
  7. $theme_options = get_option('option_tree');
  8. $homeCategory = get_option_tree('home_category',$theme_options);
  9. $homeNumber = get_option_tree('home_number',$theme_options);
  10. }
  11. ?>
  12.  
  13. <div id="main">
  14.  
  15. <h2 class="entrytitle"><?php echo get_cat_name( $homeCategory ) ?></h2>
  16.  
  17. <div class="listing">
  18.  
  19. <?php
  20. $temp = $wp_query;
  21. $wp_query= null;
  22. $wp_query = new WP_Query();
  23. $wp_query->query('cat='. $homeCategory .'&showposts='. $homeNumber .'&paged='. $paged .'');
  24. while ($wp_query->have_posts()) : $wp_query->the_post();
  25. ?>
  26.  
  27. <div <?php post_class(); ?>>
  28. <?php if (has_post_thumbnail()) { ?>
  29. <a class="blogThumb" href="<?php the_permalink() ?>"><?php the_post_thumbnail('blog', array('title' => "")); ?></a>
  30. <div class="postTitle">
  31. <?php } else { ?>
  32. <div class="postTitle noImage">
  33. <?php } ?>
  34. <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
  35. <div class="metaInfo"><?php the_time('F j, Y') ?>&nbsp; / &nbsp;<?php comments_popup_link('No Comments &rsaquo;&rsaquo;', '1 Comment &rsaquo;&rsaquo;', '% Comments &rsaquo;&rsaquo;'); ?></div>
  36. </div><!--end title-->
  37. </div><!--end post-->
  38.  
  39. <?php endwhile; ?>
  40.  
  41. <?php get_template_part("navigation"); ?>
  42.  
  43. <?php $wp_query = null; $wp_query = $temp;?>
  44.  
  45. </div><!--end listing-->
  46.  
  47. </div><!--end main-->
  48.  
  49. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement