Home › Forums › Add-ons › Repeater Field › How to show PDF's by title? › Reply To: How to show PDF's by title?
Hi @stefanluk
If you have selected the return format of ‘file object’, the your code won’t work. Your code expects the value to be an ID.
For example, your code $url = wp_get_attachment_url( $attachment_id );
requires $attachment_id to be an integer. However, if you have selected ‘file object’ as the return setting, this will NOT be an integer!
Please read the docs and debug your code to see what data you have available on each line.
Thanks
E
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.