Archived topic
I want to add a file type
8 replies · Started by _blank on September 10, 2018
I need to place a gpx file type on my website so the visiters are able to download this filetype.
I am able to ftp that file type to a folder on my website, but when I try to download the file to my desktop, it opens it automaticly in a text editer an I don't get the option to download the file as it is. (it works fine with zip and other well known file types).
I think I know there must be added some code in the theme file (functions.php??) (or childtheme file) but I cannot find the right code and don't know where exactly to add these code.
I hope this is clear an someone can help me out.
Hi there,
you could try the HTML5 download attribute in your links:
Can you point me to a page where the download link is?
Sorry this is the html:
a href="/brochures/GL201534km.gpx" download>
/a
https://www.wscdeverbinding.nl/dag1-test-4daagse/
I see that little strange picture in Chrome but not in firefox
The images are added by the browser (those that 100% support the download att). Can't see a meta value to disable them. You could add a class to the anchor and then hide it with CSS e.g:
<a href="link" class="download-link" download>Download title</a>
a.download-link img {
display: none;
}
Thank you, with the class='download-link" it works without that strange picture in chrome.
Thats awesome. Glad to be of help.