Order by syntax for sorting in a relationship
-
Hi. I have two post types, Issues and Articles (one-to-many, articles appear in issues). The relationship field is “issue_articles” in Issue, and “article_issue” in Article. When displaying the contents of issues, I list the articles under the issue they are related to. This all works fine.
But under each issue, I want to sort the articles using a field in the articles, article_pdf. Right now here’s what I’m trying: In the Issue pod, in its issue_articles field, set ORDER BY to article.article_pdf … or article_pdf, or article_pdf.meta_value, etc.
Are there examples sorting related posts using a field in the related posts? Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Order by syntax for sorting in a relationship’ is closed to new replies.