• Hi

    I am fairly new to WordPress and ACF in general and I am trying to do a website related to the movie industry.

    I have succeeded in creating 2 Custom Post Types:
    1. Movie Details – This is a Custom Post Type where all the details related to a movie are stored. To add certain movie specific data, I used ACF to create 2 basic fields:

    • Release Date (Type TEXT)
    • Poster Image (Type IMAGE)

    2. Movie List – This is a Custom Post Type where I show the movies in different lists, for example related to release date. In this custom post type, I have create the following ACF structure

    • Movie List (Type REPEATER)
    • Movie Name (Sub Field of type TEXT)

    The idea is that through wordpress, display a list of lets say ‘2018 movies’. I would like to do the following:
    1. Load a particular list(post ID) from the Movie List
    2. Loop each Movie found in this Movie List (repeater)
    3. For each Movie, while looping, get the Release Date and Poster Image from Movie Details.

    It might sound simple but I have spent many days trying to solve this with no luck!

    Can you please help me out?

    Thank you!

    Ian

Viewing 4 replies - 1 through 4 (of 4 total)
  • 3 bits of advice:

    1. You’ll get told off by others for not posting this in the ACF plugin’s forum 😉
    2. How are you with writing WordPress PHP template code, because you’ll have to get your hands dirty if you want something like that
    3. It’s worth paying for the ACF Pro version of the plugin as that gives you a Related Posts field type that will make your Movie List so much easier

    Hope that helps

    Thread Starter ianwrightphotos

    (@ianwrightphotos)

    Hi Peter

    Thanks for your reply.

    Did not post in ACF forum since its mixed with Custom Post Type 😉

    With regards to PHP templating, lets say that I am getting messed up and dirty in it 🙂

    I will into the Related Posts you suggested.

    Thanks

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Did not post in ACF forum since its mixed with Custom Post Type 😉

    I wish you had. 😉 Plugin topics get moved when found. Unfortunately I can’t move it to the right sub-forum.

    Rather than posting in Developing with WordPress (and I’ve moved it to Fixing WordPress) please ask plugin topics in that plugin’s dedicated support sub-forum instead.

    See, told ya 😉

    Actually, I wouldn’t bother with the 2nd Movie List CPT – it’s not really necessary as you can do that with in code.

    For the main Movie CPT the poster image can be uploaded to the Featured Image panel, so you don’t need an additional field for that. For the release date though you should use a date field as it makes sure that it’s stored properly in the database (a text field can store anything, so there’s scope for entering something that’s not a date!)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Reading from Advanced Custom Fields (ACF) and Custom Post Types’ is closed to new replies.