-
-
Save braddalton/3682be9dcc6d3ba32ea0 to your computer and use it in GitHub Desktop.
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 | |
/* | |
Template Name: Custom Loop | |
*/ | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_action( 'genesis_loop', 'custom_query' ); | |
function custom_query() { | |
global $paged; | |
global $query_args; | |
$args = array( | |
'post_type' => 'portfolio', | |
'posts_per_page' => '6', | |
'post_status' => 'publish', | |
'paged' => $paged, | |
'orderby' => 'rand' | |
); | |
//* Remove the entry meta in the entry header | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 5 ); | |
//* Remove the entry meta in the entry footer | |
remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 ); | |
remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); | |
remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 ); | |
echo '<div class="communities">'; | |
genesis_custom_loop( wp_parse_args($query_args, $args) ); | |
echo '</div>'; | |
} | |
genesis(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment