Guest User

Untitled

a guest
Nov 3rd, 2014
324
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. add_filter( 'pre_get_posts', 'all_on_front' );
  2. function all_on_front( $query ) {
  3.     if ( $query->is_home() ) {
  4.         $query->set( 'numberposts', -1 );
  5.         $query->set( 'posts_per_page', -1 );
  6.         $query->set( 'post_status', 'publish' );
  7.     }
  8. }
RAW Paste Data