Home › Forums › Front-end Issues › Link straight to pdf rather than the attachment page › Reply To: Link straight to pdf rather than the attachment page
The page link field is exactly that – a link to the page.
To link to the attachment file, you will need to change the field_type to post_object. This will then allow you to receive a post object / ID which you can use to load the attachment URL.
Also, I believe the user experience will be much nicer if you use the file field to select a pdf file.
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.