How to upload a file and have it available on the post for download?

admin2025-04-18  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.

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.

Share Improve this question asked Nov 30, 2019 at 18:33 ToroLocoToroLoco 1 1
  • Hope this will give you a clear explanation advancedcustomfields/resources/file – Gopala krishnan Commented Dec 2, 2019 at 8:59
Add a comment  | 

1 Answer 1

Reset to default 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.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1744950065a276279.html

最新回复(0)