How do I sort entries by two variables? Currently I am sorting the entries by an ID:

{% for gallery in craft.entries.section('Gallery').order('available desc').limit(none) %}


but I would like to show the latest entries on top, currently it shows available first but latest entries ones go to the bottom. How can I mix the above code with something like this?

.order('postDate desc') %}
If you want to order by multiple columns that include custom fields, first make sure you're at least on Craft 2.4.2684, then you'll be able to use this syntax:

{% for gallery in craft.entries.section('Gallery').order('postDate desc, available desc').limit(null) %}


Also note that that you should be using limit(null) instead of limit(none) if you want to result all results.