• Resolved mrapino

    (@mrapino)


    Hello, I created a custom field for multiple photos and I am trying to display them by looping through the custom field, so I have control over how the photos show up on the page.

    I am trying to use the built-in PODS Each loop, but it is just displaying as plain text on the front-end.

    [each banner_gallery_images]

    {@_img.medium}[/each]

    “banner_gallery_images” is my field name. I was expecting the shortcode to execute, but all I see is the plain code on the website.

    Please advise.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    hi @mrapino

    What kind of plain code do you see? Img sources?

    Cheers, Jory

    Thread Starter mrapino

    (@mrapino)

    Jory, I spent a lot of time working on it and found the issue. It wasn’t clear in the documentation, but I connected the dots finally… since [each] and the conditional shortcodes are only available within templates, I figured out that I needed to wrap the code block with [pods] [/pods] to create a custom “one-use” template.

    I’m sure I could have also written some PHP code to loop through the post meta, but I really wanted to use the built-in Pods functionality to display multiple outputs from a repeating custom field.

    Anyway, thanks for your reply. If you don’t have plans to refine your documentation, I would request that you put this on the roadmap. I’ve gone through a lot of your docs, and there are times when more explanation and usage examples would definitely help.

    I’m excited for v3!

    Take care.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘EACH loop not working for multiple images’ is closed to new replies.