Direct download button

H

I added a button to the Press & Media of my web site for the user to download our logos. However I can only get the file to open in a new window. I would like the button to just download the file and not open it in a new window.

I’ve found this bit of code on the old forum, I’ve added forcedowload in ID, but it doesn’t work.

I know there’s something in the code to change in order for it to work but I don’t know what.

Please help

Added to JS Script on my page:

jQuery( document ).ready(function($) {
$( “#forcedownload” ).attr( “download”, “” );
});

Hi @Teranox,

Thank you for writing in, make sure you added that JS code under Theme Options > JS and you apply the ID forcedownload on the download button.

But what I really advise, is to zip your Logo file that is the common way of making a downloadable file, even without that JS code, the zip file will be downloaded.

How to Make a Zip File

Hope it helps,
Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.