Advertisement
Guest User

Untitled

a guest
Nov 18th, 2011
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.77 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3.         <div id="primary">  <!--home template -->
  4.  
  5.             <div id="content" role="main">
  6.  
  7.             <?php do_action( 'voodoo_pre_loop' ); ?>
  8.             <?php $stickies = get_option( 'sticky_posts' );
  9.                               $do_not_duplicate = array() ?>
  10.             <?php if( is_home() && !is_paged() ) : ?>
  11.  
  12.                 <?php $args = array(
  13.                     'posts_per_page' => 1,
  14.                     'post__in' => get_option( 'sticky_posts' ),
  15.                     'ignore_sticky_posts' => 1
  16.                 );
  17.                 $my_query = new WP_Query( $args );
  18.                 while ($my_query->have_posts()) : $my_query->the_post();
  19.                 $do_not_duplicate[] = $post->ID; ?>
  20.                 <?php get_template_part( 'content', 'featured' ); ?>
  21.                 <?php endwhile; ?>
  22.                 <?php wp_reset_postdata(); ?>
  23.                
  24.                 <?php if ( is_active_sidebar( 'sidebar-2' ) ) : ?>
  25.                         <?php dynamic_sidebar( 'sidebar-2' ); ?>
  26.                 <?php endif; ?>
  27.                
  28.                 <?php $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
  29.                 $not_in = (is_array($stickies) && !empty($stickies)) ? array_merge($stickies, $do_not_duplicate) : $do_not_duplicate;
  30.                 $more_args = array(
  31.                     'posts_per_page' => 9,
  32.                     'post__not_in' => $not_in,
  33.                     'paged' => $paged
  34.                 );
  35.                 query_posts( $more_args ); ?>
  36.                
  37.             <?php endif; ?>
  38.  
  39.             <?php if ( have_posts() ) : ?>
  40.  
  41.                 <?php voodoo_content_nav( 'nav-above' ); ?>
  42.  
  43.                 <?php while ( have_posts() ) : the_post();
  44.                  ?>
  45.  
  46.                     <?php $format = get_post_format();
  47.                     if ( false === $format )
  48.                         $format = 'standard';
  49.                         get_template_part( 'content', $format ); ?>
  50.  
  51.                 <?php endwhile; ?>
  52.  
  53.                 <?php voodoo_content_nav( 'nav-below' ); ?>
  54.  
  55.             <?php else : ?>
  56.  
  57.                 <?php voodoo_else(); ?>
  58.  
  59.             <?php endif; ?>
  60.  
  61.             </div> <!-- #content -->
  62.  
  63.         </div> <!-- #primary -->
  64.  
  65. <?php get_sidebar(); ?>
  66.  
  67. <?php get_footer(); ?>
  68.  
  69.  
  70.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement