patric-boehner
9/17/2014 - 8:29 PM

wp_query using genesis_custom_loop. To alter content use standard genesis add_action and remove_action hooks

wp_query using genesis_custom_loop. To alter content use standard genesis add_action and remove_action hooks

<?php

//* Custom loop WITH pagination
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'bhl_do_resident_query' );
function bhl_do_resident_query() {

    global $paged;
    global $query_args;

    // Show Residents
    $args = array(
        'post_type'      => 'resident',
        'posts_per_page' => '36',
        'post_status'    => 'publish',
        'paged'          => $paged,
    );

    genesis_custom_loop( wp_parse_args($query_args, $args) );

}