Skip to content

Instantly share code, notes, and snippets.

@johnbuck
Created May 29, 2014 05:27
Show Gist options
  • Save johnbuck/3c712d93cdde0d22bf00 to your computer and use it in GitHub Desktop.
Save johnbuck/3c712d93cdde0d22bf00 to your computer and use it in GitHub Desktop.
Change the number of columns displayed by the Projects by WooThemes plugin
add_filter( 'projects_loop_columns', 'change_projects_columns', 99 );
function change_projects_columns( $columns ) {
$cols = 3;
return $columns;
}
@bozzmedia
Copy link

bozzmedia commented Oct 7, 2016

There is an error in the variable code above (should be $columns in this instance) so it didn't work for me, pulled this one from the documentation and works well.

add_filter( 'projects_loop_columns', 'change_projects_columns', 99 );
function change_projects_columns( $cols ) {
    $cols = 3;
    return $cols;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment