Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #744020

    Hi
    I’d like to add a button that downloads a simple pdf.
    when i add a button in a site it only let’s me link to a page or a post, but not to a document.
    how do I do that?

    #744110

    Hey Rio1!

    You can use a Shortcode with a button and change the link, to a file.
    That is possible, have you tried it at all?

    Best regards,
    Basilis

    #744123

    Hey basilis,

    So basically I would upload the file, and paste the file’s URL into the buttons custom link?

    #744246

    Hi,

    Yes, that should work. Did you try it out?

    Best regards,
    Rikard

    #745629

    Hey Rikard,

    yeah I tried it out. It works as far as opening a new tab and displaying the pdf in it.
    I’d like the button to function as a direct download command though. (on click download without additional tabs being opened and the sit changing).

    how can I do that?

    #746106

    Hi,

    I don’t think that is something you can control since it comes down to what browser you are using, and what settings you have in it. Chrome for instance will open files like that in the browser, but you will get an option to save it locally once it’s open.

    Best regards,
    Rikard

    #746922

    okay, thank you

    #902940

    You can do this by adding “download” to your URL. Like this…
    <a href="myfile.pdf" download>DOWNLOAD PDF</a>

    Ref: https://www.philowen.co/blog/force-a-file-to-download-when-link-is-clicked/

    • This reply was modified 6 years, 11 months ago by welswebmaster.
    #903046

    Hi,


    @welswebmaster
    : Thanks for sharing that information :)

    Best regards,
    Nikko

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.