Buddypress – How to add group types

It can be useful to have group types sometimes for example, maybe a University might want to have 2 group types for staff and students. So they could have staff groups and student groups ( and a directory for each eg staff would list the staff groups and student groups would list the Student Groups … Read more

Buddypress how to sort Groups page alphabetically by default

In this short blog post I’ll run over how you can sort the Groups index page in Buddypress alphabetically by default (i.e. on first load of page they will be ordered by group name). Edit or override 2 of the Buddypress templates You’ll need these in your theme: wp-content/YOUR_THEMENAME/buddypress/groups/index.php and wp-content/YOUR_THEMENAME/buddypress/groups/groups-loop.php If these templates don’t … Read more

Laravel how to set a checkbox value to checked based on models value

In this post I’ll show how to set a Laravel checkbox value to checked based on the value stored on the model. In this example I’ll be using the Laravel Collective Form checkbox {{ Form::checkbox(‘collected’ /* name */, “yes” /*value*/, old(‘collected’, $gas_cert->collected==”yes”?true:false ) /* true sets checked */ ) }} In the code example above … Read more