Is it possible to use repeatable fields groups with a custom post type?
Repeatable Fields Groups can only be used for Post Types, and only for one post type a time.
(It cannot be assigned to many post types).
Hence yes, they can (and should) be used on a Post Type.
So I will create a repeatable field groep for the article, and instead of adding fields to this group, I want to be able to select the authors(s).
You would:
- create a Post Type (Article)
- Create a Repeatable Field Group (RFG) for that Post Type
- In that RFG, you will add Fields. For example a Single Line, or Select Field
- When you add Posts you add RFG's to the posts as well, and within them populate your fields (authors, for example)
It is a bit tricky if you want to have those fields be "prepopulated" with authors, that is not possible out of the box.
But since you create your Author Posts anyway manually as well (I suppose) you could actually just populate a Select Field with all the required author names for example.
That is done once and can be reused.
When you then populate many times the Select (Author) field for the RFG that is added to the Article, you can later display those Authors when you view the Article.
The very, very simplest approach for this is actually a Repeating Field (This is different than a Repeatable Field Group), where you simply add a repeating single line to the Articles posts, so you can add as many authors you want each article
It depends a lot on what data you need to save against the authors, so to choose what to use.
If you need only their name, a repeating single line is enough.
For more complex information a Repeatable Field Group with an Author Select Field and additional fields for the author data can do
For a fully customizable data set a Post Type would be needed, whereas we are back the request to drag and drop those into an order, which is not possible.
I filed this request here:
https://toolset.com/feature-request/allow-to-drag-and-drop-related-posts-into-custom-order/
You can upvote it here (please do so, as otherwise, it will not gain traction):
https://toolset.com/feature-request/?wpv_post_search=Allow+to+drag+and+drop+related+Posts+into+custom+order&wpv_view_count=686737
If above workarounds won't help, the request is filed and eventually we can look into this.