Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Custom loop for masonry page layout
// Masonry loop
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'wpstudio_content_area', 'wpstudio_masonry', 30 );
function wpstudio_masonry() {
$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
$args = ( array(
'post_type' => 'post',
'order' => 'desc',
'order_by' => 'date',
'paged' => $paged,
'posts_per_page' => 6,
)
);
echo '<section class="blog" id="container">';
genesis_custom_loop( $args );
echo '</section>';
do_action( 'genesis_after_endwhile' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.