I have a index.php with a featured post and a number of other posts and the standard wp_pagenavi at the bottom.
I'm using the 2 loops from the wordpress codex like this:
<?php $my_query = new WP_Query('category_name=featured&posts_per_page=1'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID;?> <!-- Do stuff... --> <?php endwhile; ?> <!-- Do other stuff... --> <?php if (have_posts()) : while (have_posts()) : the_post(); if( $post->ID == $do_not_duplicate ) continue; ?> <!-- Do stuff... --> <?php endwhile; endif; ?>
If I've read the theme hierarchy correctly, an archive.php page should be used when clicking "Previous" in the pagination section... (correct?)
However, this is not the case, clicking previous is showing me a page with the same layout as my index.php and thus with the same featured post. (pagination on the other posts does work though)
I've been messing around with
is_paged but haven't been able to get it working...
Thanks for the help!