The issue is that pre_get_posts
runs on both the Front End and on the Admin Side unless you specifically tell it not to, here’s the function you supplied with a small twist:
function pregp_archive_ppp_wpse_108225( $qry ) {
if( is_admin() ) {
return;
}
if( $qry->is_main_query() && $qry->is_archive() ) {
$qry->set( 'posts_per_page', 5 );
$qry->set( 'post_type', array( 'post', 'location', 'game' ) );
}
}
add_action( 'pre_get_posts', 'pregp_archive_ppp_wpse_108225' );
Note the first conditional is_admin()
– this will test against any / every admin page so that the following changes will only apply to front-end queries.