• Resolved totorbo

    (@totorbo)


    Hi! I want to have a clickable button that ‘force’ the download of the file it’s linked to.

    I currently use this shortcode
    [su_button url="https://www.mywebsite.com/wp-content/uploads/filename.mp3" background="#FF6B53" size="2" icon="icon: download"]download[/su_button]

    However, when I click on it, I’m redirected to a page with an embedded player.

    I would like to act as it is the case with following HTML tag : <a href="https://www.mywebsite.com/wp-content/uploads/filename.mp3" download="my file.mp3"> download </a> with a nice button instead of only the word “download”.

    Any guess ?

    https://www.ads-software.com/plugins/shortcodes-ultimate/

    Related topic 1|/a>

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter totorbo

    (@totorbo)

    Thread Starter totorbo

    (@totorbo)

    I managed to do this by modifying the .htaccess file, as explained here ; i.e. adding

    <FilesMatch "\.(?i:mp3)$">
      ForceType application/octet-stream
      Header set Content-Disposition attachment
    </FilesMatch>

    Hi,
    I having a same problem. Tried to look for htaccess file. Can’t find it.

    Where is it? Which folder.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘button with 'forced download'’ is closed to new replies.