Hello, I recently added the ability for custom post formats (image, quote, video and aside) for my WordPress theme. It's good but my homepage is getting cluttered with the standard format posts getting lost in the wild.
So I thought it would be a good idea to have a standard format only page. I created a page template with the following code:
<?php /* Template name: standard */ $args = array( 'showposts' => $number, 'tax_query' => array( array( 'taxonomy' => 'post_format', 'field' => 'slug', 'terms' => array('post-format-video','post-format-quote','post-format-image','post-format-aside'), 'operator' => 'NOT IN' ) ) ); query_posts( $args ); get_header() ?> <div id="posts" class="home"> <?php if ( have_posts() ) : ?> <?php ?> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', get_post_format() ); ?> <?php endwhile; ?> <?php else : ?> <?php endif; ?> <nav class="pagination"> <ul> <li class="prev"><?php next_posts_link('« Previous Page') ?></li> <li class="next"><?php previous_posts_link(' :: Next Page »') ?></li> </ul> </nav> </div> <?php get_footer(); ?>
As you can see, the main bit is the first block of PHP code which I found after some Googling. It works and the page only shows standard format posts, however navigation does not work. If I click on "previous" or "next" it just loads up the first page again and I cannot work it out.
I assume this is because by their definition, pages aren't set up to handle navigation -- but as far as I'm aware there's no way to create custom indexes.
(Does WordPress have a built in way to only show certain post formats such as blog.com/format/aside because if it does, I cannot find it.)
Any help would be brilliant, thank you a lot.