Skip to main content
4 of 4
replaced http://wordpress.stackexchange.com/ with https://wordpress.stackexchange.com/

Edit

Note: you can use the same technique for a custom page template, with a custom loop via new WP_Query():

// Post Formats
$post_formats_array = array(
    'post-format-aside',
    'post-format-audio',
    'post-format-chat',
    'post-format-gallery',
    'post-format-image',
    'post-format-link',
    'post-format-status',
    'post-format-quote',
    'post-format-video'
);
// Custom query args
$standard_posts_query_args = array(    
    'tax_query' => array(
        array(
            'taxonomy' => 'post_format',
            'field' => 'slug',
            // Use array defined above,
            // or try omitting 'terms' entirely
            'terms' => $post_formats_array,             
            'operator' => 'NOT IN'
        )
    )
);
// Custom query
$standard_posts = new WP_Query( $standard_posts_query_args );

// Custom query loop
if ( $standard_posts->have_posts() ) : while ( $standard_posts->have_posts() ) : $standard_posts->the_post();
    // Loop markup here
endwhile; endif;

Pagination

For pagination, please refer to this Question/Answer.

Original Answer

Why not just exclude posts with post formats from the main posts archive?

function wpse129372_filter_posts_archive( $query ) {
    if ( $query->is_main_query && $query->is_archive() ) {
        $post_formats_array = array(
            'post-format-aside',
            'post-format-audio',
            'post-format-chat',
            'post-format-gallery',
            'post-format-image',
            'post-format-link',
            'post-format-status',
            'post-format-quote',
            'post-format-video'
        );
        $tax_query = array(
            array(
                'taxonomy' => 'post_format',
                'field' => 'slug',
                // Use array defined above,
                // or try omitting 'terms' entirely
                'terms' => $post_formats_array,             
                'operator' => 'NOT IN'
            )
        );
        $query->set( 'tax_query', $tax_query );
    }
}
add_action( 'pre_get_posts', 'wpse129372_filter_posts_archive' );

This, paired with (I assume) custom template files (or custom page templates) for posts with post formats, would be a fairly simple way to show only "standard" posts in the archive index.

Chip Bennett
  • 55.1k
  • 8
  • 90
  • 170