If you want to accomplish it in a single query, hook pre_get_posts
to query for all posts:
function wpd_archive_all_posts( $query ){
if( $query->is_post_type_archive( 'attractions' ) && $query->is_main_query() )
$query->set( 'posts_per_page', -1 );
}
add_action( 'pre_get_posts', 'wpd_archive_all_posts' );
Then paginate those results manually in the template:
if( have_posts() ){
$posts_per_page = 10;
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
$start = ( ( $paged - 1 ) * $posts_per_page ) - 1;
$end = ( $paged * $posts_per_page ) - 1;
$wp_query->current_post = $start;
while( have_posts() ){
the_post();
// output post data here
if( $end == $wp_query->current_post )
break;
}
}
Then rewind and output all of them:
$wp_query->rewind_posts();
while( have_posts() ){
the_post();
the_title();
}
The caveat here is that the first loop may not call the loop_end
action, since you could be ducking out of the loop before hitting the last post. In practice this may or may not have side effects, depending on whether or not you have a plugin hooking that action.