Limit Genesis Grid to Specific Category

/**
* Don't use grid on category 'featured'
*
* @param bool $display
* @param object $query
* @return bool $display
*/
function be_limit_grid_loop( $display, $query ) {
if( $query->is_main_query() && $query->is_category() && genesis_get_option( 'grid_on_category', 'genesis-grid' ) ) {
if( $query->is_category( 'featured' ) )
$display = false;
else
$display = true;
}
return $display;
}
add_filter( 'genesis_grid_loop_section', 'be_limit_grid_loop', 10, 2 );
view raw functions.php hosted with ❤ by GitHub

Using the Genesis Grid Loop plugin

Bill Erickson

Bill Erickson is a freelance WordPress developer and a contributing developer to the Genesis framework. For the past 14 years he has worked with attorneys, publishers, corporations, and non-profits, building custom websites tailored to their needs and goals.

Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Let's Talk