function custom_loop_with_pagination() {
global $post;
$sticky = get_option( 'sticky_posts' );
$args = array(
'paged' => get_query_var( 'paged' ),
'sticky_first' => array(
'post_type' => 'post',
'category_name' => 'program',
'post__in' => $sticky,
'posts_per_page' => 2,
),
'last_published' => array(
'post_type' => 'post',
'category_name' => 'program',
'post__not_in' => $sticky,
'posts_per_page' => 10,
)
);
global $wp_query;
$wp_query = new WP_Query( $args );
require 'templates/loop/grid.php';
}
add_action( 'genesis_loop', 'custom_loop_with_pagination' );
add_action( 'genesis_before_loop', 'genesis_posts_nav' );
genesis();
Leave a Reply