Advertisement
RVoodoo

Untitled

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