Created
October 17, 2014 19:00
-
-
Save nickcernis/689f54fcaa5fc13e0925 to your computer and use it in GitHub Desktop.
A custom loop that displays one post on the Genesis Blog template
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 | |
// Template Name: Blog | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_action( 'genesis_loop', 'newspro_do_custom_loop' ); | |
function newspro_do_custom_loop() { | |
global $paged; | |
global $query_args; | |
$args = array( | |
'posts_per_page' => 1, | |
'paged' => $paged, | |
); | |
genesis_custom_loop( wp_parse_args( $query_args, $args ) ); | |
} | |
genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment