Hi there,
I’m working with ACF Pro 5.6.1 on the website of a little open air theatre – http://www.reckenfeld-freilichtbuehne.de
There are 2 custom post-types, filed with ACF-fields.
1. actor-overview
2. play-overview
1. actor-overview
Every actor has it’s own profile page with a list of plays he/she takes part – with the year, name of the play and the name of the theatric part. For example – the profile page of Miriam: https://th-url.de/OiBRd
ACF-Field-group: actors
repeater-field: saison
repeater-subfields of saison:
1. year -> when you can see the play on stage (choice box)
2. play-name -> name of the play (choice box)
3. actor name -> first and last Name of the actor (choice box)
4. theatric part -> the name of the part in the play (1-row-text-field)
Example on Miriams profile page: https://th-url.de/OiBRd
Here you can see (example):
(2017) “Michel in the soup bowl”: participant of the…
2017 = field “year”
“Michel in the soup bowl” = field name of the play
participant = field theatric part
The field “3. actor name” is hidden on the profile pages, but it’s available.
2. play-overview
Every play has it’s own detail-page with description, images, play-dates, prices etc. – and a list of the actors. Example of the play 2017: “Michel in the soup bowl”: https://th-url.de/JWSbC
The play-plages has an own group of ACF-fields like description, prices, image-galleries, dates etc.
My plans are now like this:
create a dynamic list of actors of the play – with the theatric part
There are some information, which are identical in the background:
Every actor post and every play-post are in the same category. The name of the categories equals the name of the play.
Example in angled brackets:
play-name: [Michel in the soup bowl]
category-name: [Michel in the soup bowl]
repeater sub-field “play-name” @ actor-profiles: [Michel in the soup bowl]
My idea is now … and I’ve got a problem with the php-querry (should be insered in the play-template):
1. Get the title/name of the play => Michel in the soup bowl
2. compare the play-title from 1. with the repeater-sub-field “play-name”
play-title: [Michel in the soup bowl] = repeater-sub-field “play-name” [Michel in the soup bowl]
alternative: compare the play-post-category with the repeater-sub-field “play-name”
3. show me the ACF-repeater-sub-fields: “theatric part”: actor name
In the end, I need a dynamic list on the play-posts of the actors and their theatric parts. A friend (for 3 weeks on holidays now) told me, it’s verry simple and easy with 3 or 4 querries … but … damm … I’ve got a blockade with this querry.
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!
🚨 The 2023 ACF Annual Survey closes tomorrow! This is your last chance to complete the survey and help guide the evolution of ACF. https://t.co/0cgr9ZFOJ5
— Advanced Custom Fields (@wp_acf) May 18, 2023
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.