Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created January 22, 2013 15:13
Show Gist options
  • Save billerickson/4595347 to your computer and use it in GitHub Desktop.
Save billerickson/4595347 to your computer and use it in GitHub Desktop.
<?php
/**
* Grid Loop on Portfolio archive
*
* @author Bill Erickson
* @link https://github.com/billerickson/Genesis-Grid/wiki/Home
*
* @param bool $grid, whether to use grid loop
* @param object $query, the WP Query
* @return bool
*/
function be_grid_loop_on_portfolio( $grid, $query ) {
if( is_tax() && $query->is_main_query() )
$grid = true;
return $grid;
}
add_filter( 'genesis_grid_loop_section', 'be_grid_loop_on_portfolio', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment