Skip Navigation

[Resolved] Ordered Post Reference Field?

This support ticket is created 3 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 3 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#2340671

I need to have a list of authors on blog posts, with the first author having a different style. It needs to be easy for the user to re-order authors, or add new ones, but I can't find a way to let the user easily order post references, or to sort them by their order. Without really overcomplicating things, can I set it up so the user can re-order referenced posts, and have a view sort by that order?

#2340883

Hello,

I assume we are talking about this case:
Two post types:
- authors
- posts
There is a Reference Field "related-author" in posts.

Toolset Reference Field is based on one-to-may relationship, as a workaround, you can try with nested view, for example:
1) Parent post view:
- query the "authors" posts, here you can order the result by fields of authors post type,
- in view's loop, display below child post view

2) Child post view,
- query the "authors" posts,
- Filter by post type relationship between "authors" and "posts"
- In view's loop display "posts" information

#2340933

My posts can have multiple authors, so it needs to be easy for editors to move them around (make someone the first/primary on one article, but the secondary on another). I've found a way to do this by using a number field on an intermediary table of a many-to-many relationship, but that's very cumbersome and not user friendly. Ideally I would want to be able to drag and drop names (post titles) in a list or something.

#2341017

Yes, you are right, you can setup many-to-many relationship between post types "authors" and "posts", and add a number field on an intermediary post type.

So in the single post, you can add a post view:
- Query posts of intermediary post type
- Filter by relationship between post types "authors" and "posts"
- In view's loop, display related "authors" post information
https://toolset.com/course-lesson/displaying-related-posts/

And there isn't such kind of built-in feature in many-to-many relationship: drag and drop names (post titles) in a list or something
You can add a feature request for it:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/
Our developers will evaluate it