Home › Forums › General Issues › Get content from CPT posts and reorder it
Hi
I have 2 CPT’s Films and People.
I have prizes attributed to Films directed by People and so I need to get those prizes into People as well.
Prizes on Films are inserted and ordered by Year, Festivals and finally the Prize Name.
The Structure is:
. The Film
– Prizes as a Repeater field (for many prizes per film)
— Year as a Text field
— Festivals as a Repeater field (many festivals and many prizes per year)
—– Festival as PostObject field (get Festival Names from Festival CPT)
—– Prizes as Relationship (get Prize Names from Prizes CPT)
Now on People I relate directed films with a Relationship field that get’s the Films.
To get the Prizes into People I need to get the prizes for all related films and order by year, film, festival and prizes.
So can I do that?
Thank you.
B
I can only give you a rough outline of what needs to be done. This would take a good deal of coding.
When showing a person:
Like I said, I would build a function that works with usort().
ACF has a basic example of using array_multisort() here https://www.advancedcustomfields.com/resources/how-to-sorting-a-repeater-field/
Thank you John.
Noticed on your profile you could code.
How would it be possible?
John Huebner
I mean could you present a quotation for that job?
Sorry for the late reply. I am not currently taking on any freelance projects. This would not be the correct place to look for someone to take on your dev work.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.