Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Based on https://gist.github.com/billerickson/3218052
- global $post;
- // arguments, adjust as needed
- $args = array(
- 'post_type' => 'post',
- 'posts_per_page' => get_option( 'posts_per_page' ),
- 'post_status' => 'publish',
- 'paged' => get_query_var( 'paged' )
- );
- /*
- Overwrite $wp_query with our new query.
- The only reason we're doing this is so the pagination functions work,
- since they use $wp_query. If pagination wasn't an issue,
- use: https://gist.github.com/3218106
- */
- global $wp_query;
- $wp_query = new WP_Query( $args );
- if ( have_posts() ) :
- while ( have_posts() ) : the_post();
- endwhile;
- do_action( 'genesis_after_endwhile' );
- endif;
- wp_reset_query();
- }
- genesis();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement