You could just alter the main query for your custom post type archive with pre_get_posts().
Code:
function wpse124228_alter_ppp_order_for_mycpt( $query ) {
if ( ! $query->is_main_query() || is_admin() )
return;
if ( is_post_type_archive( 'mycpt' ) ) {
//Only display 1 post on mycpt archive
$query->set( 'posts_per_page', 1 );
//Most recent/current
$query->set( 'orderby', 'date' );
$query->set( 'order', 'DESC' );
}
}
add_action( 'pre_get_posts', 'wpse124228_alter_ppp_order_for_mycpt' );
This pretty much resembles this example from the codex page. BTW don’t use query_posts()
, if you have to do a second query go with WP_Query
, but for an archive that shouldn’t be necessary.
Additional Information: