You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The query parameter orderby is supported by the post loop type, which passes it to WP_Query to make a database query.
Similarly, the taxonomy loop type with WP_Term_Query and user loop with WP_User_Query. Each of these is a separate implemenation in WP core with some differences in accepted values.
The generic loop filter sort_field is supported by the base loop, which all loop types are built on.
Any loop type with multiple values, including the result of post queries, can be sorted as long as it's a list of objects with sortable field values (like number, string, date).
From:
Query parameter
orderby
The query parameter
orderby
is supported by the post loop type, which passes it toWP_Query
to make a database query.Similarly, the taxonomy loop type with
WP_Term_Query
and user loop withWP_User_Query
. Each of these is a separate implemenation in WP core with some differences in accepted values.orderby
parameter for Post, Taxonomy Term, and User. #7Generic loop filter
sort_field
The generic loop filter
sort_field
is supported by the base loop, which all loop types are built on.Any loop type with multiple values, including the result of post queries, can be sorted as long as it's a list of objects with sortable field values (like number, string, date).
sort_field
,sort_order
, andsort_type
They're briefly documented here. https://docs.loopsandlogic.com/dynamic-tags/loop/#attributes-1
The text was updated successfully, but these errors were encountered: