Created
August 18, 2015 15:14
-
-
Save luistinygod/6ff352a2f3442bf6715b to your computer and use it in GitHub Desktop.
GravityView: Convert a list view into a grid style (3-col)
This file contains 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 | |
/** | |
* Add the `gv-grid` class to the list container | |
*/ | |
function my_gv_list_container( $classes ) { | |
return $classes . ' gv-grid'; | |
} | |
add_filter( 'gravityview/render/container/class', 'my_gv_list_container', 10, 1 ); | |
/** | |
* Add the `gv-grid-col-1-3` class to the entries container | |
*/ | |
function my_gv_list_entry_container( $classes, $entry, $instance ) { | |
return $classes . ' gv-grid-col-1-3'; | |
} | |
add_filter( 'gravityview_entry_class', 'my_gv_list_entry_container', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment