Home Forums General Issues Custom page to create a Post with a Field Gallery


Custom page to create a Post with a Field Gallery

  • Hi! So I’ve created this page with a Form that allows a user (don’t want them to see the WP dashboard) to write a Post: title, excerpt, category, etc. and attach up to 5 images to it. The first image being the post featured photo. I made this work perfectly with ACFpro, however, I’d like the users to use the same input form to also optionally type in the photo’s titles so they show up later in the post’s gallery. That is, modify the actual photo uploaded filename with those custom texts.

    I already have custom fields for those texts besides de gallery field. (My ACF group has a gallery field and 5 individual text fields for this).

    Now I need a code snippet, guess an ACTION to basically assign those texts to the actual gallery photos… but I’m stuck at writing the foreach loop cause I’m not sure how to assign each photo with the corresponding ACF text field that contains the actual user’s photo custom title, since that’s not an array but individual fields…

    Can anyone direct me? Thank you!

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.