How do I get the attachment url? – Function reference
-
I have a “gallery” that contains posts from a category. The gallery is on the “download section” page. It displays all the thumbnails posts from the category “documents”.
With the WCK plugin I added a field to attach uploaded *.pdf files to the post.
What I want: When I click on one post in the gallery, it must link to the uploaded pdf file.
In the code within the loop, I try to call the url of the uploaded attachment in the following way:
<a href="<?php echo wp_get_attachment_link(); ?>"
But now the only link I get is : “missing attachment”.
Where can I find the correct code to get the link of my uploaded attachment?
Thanks in advance!
The url of the page:
https://www.solar-sell.eu/documenten-database/https://www.ads-software.com/plugins/wck-custom-fields-and-custom-post-types-creator/
- The topic ‘How do I get the attachment url? – Function reference’ is closed to new replies.