Home › Forums › ACF PRO › Zip download of all .vcard files from File field › Reply To: Zip download of all .vcard files from File field
First is that the_field()
echos the field, that’s not what you want. You need to use get_field()
. Then you need to get the path to the actual file. ACF only stores the attachment ID and will return what you set it to return. You need to take what is returned and then get the actual full file path to the file and use this file path to add it to the .zip file, like the code in the example your following does.
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.