Last active
February 3, 2017 17:54
-
-
Save jamiemitchell/10957259 to your computer and use it in GitHub Desktop.
Replace default loop with genesis_custom_loop
This file contains hidden or 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 | |
remove_action('genesis_loop', 'genesis_do_loop'); | |
add_action('genesis_loop', 'custom_do_loop'); | |
function custom_do_loop() { | |
global $paged; | |
$args = array( | |
'post_type' => 'portfolio', | |
'order' => 'DESC', | |
'posts_per_page' => 4 | |
); | |
genesis_custom_loop( $args ); | |
} | |
genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This basically turns the default Genesis loop to a custom loop so you can still use the Genesis hooks to remove and move stuff around.