Download Shortcode Wordpress Plugin - Rating, Reviews, Demo & Download
Plugin Description
Have you ever linked a PDF, an mp3, image, or other kind of file because you wanted to let people download it but instead it just loads in the browser? This plugin introduces a [download]
shortcode which allows you to output links that will tell the browser to download those files!
Usage
WITH ‘pretty permalinks’ enabled in Settings > Permalinks:
The following example would display as:
- A link titled
My Link
- With a rewritten URL of
http://yoursite.com/download/my_song.mp3
[download label="My Link"]http://yoursite.com/wp-content/uploads/my_song.mp3[/download]
The following example would display as:
- A rewritten link titled
http://yoursite.com/download/my_song.mp3
[download]http://yoursite.com/wp-content/uploads/my_song.mp3[/download]
WITHOUT ‘pretty permalinks’ enabled in Settings > Permalinks:
The following example would display as:
- A link titled
My Other Link
- With an exposed URL of
http://yoursite.com/wp-content/force-download.php?file=uploads/my_other_song.mp3
[download label="My Other Link"]http://yoursite.com/wp-content/uploads/my_other_song.mp3[/download]
The following example would display as:
- An exposed link titled
http://yoursite.com/wp-content/force-download.php?file=uploads/my_other_song.mp3
[download]http://yoursite.com/wp-content/uploads/my_other_song.mp3[/download]
Other Uses
If you wanted to use this in a php template, you could call something like:
<?php echo do_shortcode( '[download label="My Label"]http://example.com/wp-content/uploads/my_song.mp3[/download]' ); ?>
Important notes:
- If your server permissions allow it, the plugin will automatically attempt to copy force-download.php to your
/wp-content/
directory. - If your server permissions DO NOT allow it, you will need to manually upload the file located in
/download-shortcode/wp-content/force-download.php
to your/wp-content/
directory. - By default, forced-download links only support files located in your uploads directory. More about this in Other Notes.
Screenshots
No screenshots provided