Code Samples /

Ordering by Meta Query

Ajax Load More supports a single orderby parameter, however, the WP_Query class allows for extending this by ordering by a specific Meta Query.

The code below uses the alm_query_args filter to append an ever-present Meta Query to the query arguments and then order the results by the clause.

« Back to Code Samples