-
-
Save geeac/59d713c358f0cf61aad8ac71f6ca7e46 to your computer and use it in GitHub Desktop.
wp_query using genesis_custom_loop.
To alter content use standard genesis add_action and remove_action hooks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment