WP_Query orderby author specify secondary orderby criteria
Dealt with an issue today where I was querying for all post of a given post type, then ordering them by author. I figured out after some investigating that by default, within each author’s posts, WP_Query orders those posts by their modified date. Is there some way to specify a secondary criteria without having nested queries, one first for authors, then looping on each author’s posts? In my case, I wanted to order the posts by author, but then within each author, order them by ID.
- The topic ‘WP_Query orderby author specify secondary orderby criteria’ is closed to new replies.