• Resolved aurorasentinel1

    (@aurorasentinel1)


    I’m having trouble understanding how to display content from Advanced Custom Fields. Here’s my example. I have a repeater field called Employees. The repeater fields under Employees are Name and Phone Number. Are name and phone number the sub-fields? If so is this correct:
    [repeater field=”employees”]
    [sub field=”name”]
    [sub field=”phone_number”]
    [sub field=”email_address”]
    [/repeater]

    I’ve entered some data but it is just displaying a portion of the actual shortcode. What else do I need to do to display a list of employees that looks like this:
    name phone number
    name phone number
    name phone number

    Bit of a noob here but I have successfully used your plugin to display content in loops. Thanks for your help.

    https://wordpress.org/plugins/custom-content-shortcode/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Eliot Akira

    (@miyarakira)

    Hello,

    I looked into this and found that I made a mistake in the documentation. The shortcode is [repeat]. I’ll update the plugin this weekend, so that [repeater] will work also.

    Another thing I found is that there’s no simple way to display repeater fields from post other than itself. It’s possible inside a loop, but, for example, if I wanted to show repeater fields from one post or page, there’s no easy method. So, I’ll think about a solution to this also.

    Thanks for pointing out the issue. Please let me know if [repeat] solves it.

    Thread Starter aurorasentinel1

    (@aurorasentinel1)

    That did it Eliot. Thanks so much.

    Plugin Author Eliot Akira

    (@miyarakira)

    I’ve updated the plugin to add the correct shortcode name [repeater].

    Also, I addressed the point about showing repeater fields from other posts. You can use the loop shortcode like this:

    [loop name="post-slug"]
        [repeater field="employees"]
            [sub field="name"]
            [sub field="phone_number"]
            [sub field="email_address"]
        [/repeater]
    [/loop]
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Need help with ACF’ is closed to new replies.