Created
October 21, 2017 20:02
-
-
Save thomasplevy/9d2a98b5f4a7f0d531dbcea978f606be to your computer and use it in GitHub Desktop.
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 // don't copy this line to your functions.php file | |
/** | |
* Modify the number of columns used when looping achievements on the student dashboard | |
* We have CSS in the core for anywhere from 1-5 columns | |
* if you need more than 5 columns you'll want to add additional custom css to acommodate: | |
* .lifterlms ul.llms-achievements-loop.loop-cols-6 li.llms-achievement-loop-item { width: 16.666%; } | |
* @param int $cols number of columns (default is 4) | |
* @return int | |
*/ | |
function my_achievement_loop_columns( $cols ) { | |
return 5; | |
} | |
add_filter( 'llms_achievement_loop_columns', 'my_achievement_loop_columns', 999, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment