I am creating a theme myself.

When the admin publish a new post, I know how to get the title of this post, the feature image, the content, etc and output them into a template page.

How can I get the PDF file of post and create a button so when the user clicks on it then the PDF will download?

Keep on mind that on this page template,the admin will upload a pdf file.

Also I dont want to use a plugin.

Read more here: Get the PDF of WordPress post


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: