最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin3浏览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.

发布评论

评论列表(0)

  1. 暂无评论