Lego2012
12/13/2016 - 9:20 AM

Template - Use the Genesis Custom Loop

Template - Use the Genesis Custom Loop

<?php
// Do NOT include the opening php tag

remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'custom_loop' );
/**
 * Remove default loop. Execute Custom Loop Instead.
 *
 * @author Greg Rickaby
 * @since 1.0.0
 */
function custom_loop() {
global $paged;

	 $args = ( array(
		'category_name'  => 'Blog',
		'order'          => 'asc',
		'order_by'       => 'title',
	 	'paged'          => $paged,
	 	'posts_per_page' => 5
	) );

genesis_custom_loop( $args );

}

genesis();