PHP WordPress

Order WordPress posts by multiple keys

In WordPress 4.0+ WP_Query argument orderby accepts arrays, so posts can be ordered by multiple keys and orders.
In example

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.