Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save carlaizumibamford/69cd44cd7163d6cedd1e270cc1c21841 to your computer and use it in GitHub Desktop.
Save carlaizumibamford/69cd44cd7163d6cedd1e270cc1c21841 to your computer and use it in GitHub Desktop.
Show Posts without adding post information to the cache
Display 50 posts, but don’t add post information to the cache
$args = array(
'posts_per_page' => 50,
'cache_results' => false
);
$query = new WP_Query( $args );
Show Posts without adding post meta information to the cache
Display 50 posts, but don’t add post meta information to the cache:
$args = array(
'posts_per_page' => 50,
'update_post_meta_cache' => false
);
$query = new WP_Query( $args );
Show Posts without adding post term information to the cache
Display 50 posts, but don’t add post term information to the cache:
$args = array(
'posts_per_page' => 50,
'update_post_term_cache' => false
);
$query = new WP_Query( $args );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment