I’m trying to create a download button so when the user clicks on it, it will download a .pdf I have uploaded to my media library. How do I accomplish this?
Hey djshortkut!
You can use the “Set manually” option to link the button to a custom url – i.e. the document url: http://www.clipular.com/c/5918082606301184.png?k=dqH9DyyRaxJU7tthOLYNNLe1Q8k
Cheers!
Peter
Yes that works to take you to another page that displays the .pdf but is there a way to get it to download the .pdf immediately once the button is clicked instead of redirecting you to the other page?
Hey!
Unfortunately this has nothing to do with the theme code or wordpress. You must change the server/htaccess configuration to serve documents as direct downloads see http://css-tricks.com/snippets/htaccess/force-files-to-download-not-open-in-browser/
Cheers!
Peter
Ok thanks for the help! I will check this out