Don’t use query_posts()
. Use pre_get_posts
instead:
function wpse82745_filter_pre_get_posts( $query ) {
// Only modify the main loop,
// and only in the blog posts index
if ( is_home() && $query->is_main_query() ) {
$query->set( 'category__not_in', array( '13' ) );
}
}
add_action( 'pre_get_post', 'wpse82745_filter_pre_get_posts' );
This callback will exclude category 13 from the main loop in the blog posts index.