Alright, I've made a bunch of themes over the years, and I've written a lot of queries. And I just realized that I apparently have no clue how to get multiple queries to behave. So, here is the loops from my index.php:
<?php do_action( 'voodoo_pre_loop' ); ?> <?php if( is_home() ) : ?> <?php $args = array( 'posts_per_page' => 1, 'post__in' => get_option( 'sticky_posts' ), 'ignore_sticky_posts' => 1 ); $my_query = new WP_Query( $args ); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?> <?php get_template_part( 'content', 'featured' ); ?> <?php endwhile; ?> <?php if ( is_active_sidebar( 'sidebar-2' ) ) : ?> <?php dynamic_sidebar( 'sidebar-2' ); ?> <?php endif; ?> <?php $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; $more_args = array( 'posts_per_page' => 9, 'post__not_in' => get_option( 'sticky_posts' ), 'paged' => $paged ); query_posts( $more_args ); ?> <?php endif; ?> <?php if ( have_posts() ) : ?> <?php voodoo_content_nav( 'nav-above' ); ?> <?php while ( have_posts() ) : the_post(); if( $post->ID == $do_not_duplicate ) continue; ?> <?php $format = get_post_format(); if ( false === $format ) $format = 'standard'; get_template_part( 'content', $format ); ?> <?php endwhile; ?> <?php voodoo_content_nav( 'nav-below' ); ?> <?php else : ?> <?php voodoo_else(); ?> <?php endif; ?>
So, what I expected to have happen, was to have a loop. It would just grab one post. If there was a sticky, we'd grab it. If not, then the most recent post. That would always farm out to content-featured for the display. This loop seems to work. I get a stick / or not if there aren't any. And content-featured is called. This is all in the is_home, because I only want it to happen on the home/ front page.
Still in is_home is a widget area. That ain't complicated.
Next up, a second loop. My logic, the query was still inside the is_home. On the front page, I wanted 9 posts, never any stickies, no duplicates of that first post. On subsequent pages, I figured I didn't need that query. I just want all the other pages to show my standard 10 posts. No featured thing, no sidebar, etc.
So where this seems to get me, is that first post, the widget, and a mess.
That second area, I only ever get 7 posts. On subsequent pages, I still get that first featured loop which I don't want. And I only get 8 posts. I have read all over the internet, and I'm obviously not grasping something.
Any ideas: Why is_home or is_front_page won't work here? Why I can't get my numbers right? (1+9 posts is home, 10 posts remaining pages)
I'd love a little help here so I can understand this all a bit better. Thanks!