0

I am quite new on Wordpress.

I would like to have a custom field on my post creation on which I select a file. I would like to upload this file on server and have a link for download on the post that I have created.

1

1 Answer 1

0

To begin with you need to add the file as a post meta field, and on your backend - a meta box with a js calling the file uploader. One way of doing this is with the plugin Advanced Custom Fields can do this. ACF - Wordpress plugins You can also do it yourself. Try googling "how to add a custom uploader meta field in wordpress" for details. However you do it, create a custom meta field for file upload to attach to your posts.

After that, simply create a button in your post with the attached files URL (find it in the media uploader or media library) as href attribute.

2
  • Suggesting a plugin as answer isn't the best way. What if the plugin or the link dies? So removing the first line of your answer and editing the rest as it could be a complete answer/ information about the how/what to do it one way.
    – Charles
    Commented Dec 1, 2019 at 23:15
  • I will try googling it and will revert with my findings as a reply.
    – ToroLoco
    Commented Dec 2, 2019 at 17:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.