Home › Forums › Add-ons › Repeater Field › Repeater field in functions.php › Reply To: Repeater field in functions.php
Your functions.php
wont know what the value of $post
is by default, so ideally you’d want to put that code into a function which passes the post ID value into it so that you can use that value.
But why not just put this code directly into your template – single or page – and then you can be inside the loop where the post ID value will be known?
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!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.