Links are turned into this: <a href="https://mysite.com/download/2015/06/document.pdf" class="">Download</a>
It should be the wp-content/uploads
directory, but instead it’s translating the link wrong, into an imaginary download
directory.
Clicking on the links directs to a 404. I’ve tried the following:
– Flushing permalinks
– Manually copying force-download.php to the wp-content directory
Any ideas?
Thanks,
Nikka
I’d like to force download within href code. I have an image on my website that, when clicked, downloads the pdf. Here’s my code:
<img class=”alignnone wp-image-1002 size-medium” src=”https://mywebsite.com/wp-content/uploads/2015/01/image-300×151.png” alt=”” width=”300″ height=”151″ />
Where would I insert the [download] shortcode?
Thanks so much!!
]]>I’m assuming this is for your plugin. Be a good idea to check it out.
]]>Drew,
Hope all is well. We are having some issue with the plugin, it might be something on our end, but any assistance would be much appreciated. One of the link is:
Link to site
Not sure if the problem exist because of other plugins that we are using, but we have not been able to figure it out.
Again, any insight would be much appreciated,
SA
]]>Here’s my link if you want to to see it:
https://sergecouturephoto.com/downloadtest
Can you give it a look and give me a hint on what’s wrong? I’ve validated that the php is correctly in place in the wp-content directory, as the documentation said.
Serge
]]>Hi Drew,
Having similar problems. Got the href to work one time but never again. Here is what I have in the page and neither work. I have reset permalinks, I have shut down Safari, cleared cache, restated. Tried in FF as well but no joy.
https://bottleshockopen.com/test
Any ideas?
[download label=”Participant Entry Form and Bottle Labels”]https://bottleshockopen.com/download/WineEntryandLabels20140605_distributed.pdf[/download]
<a href="https://bottleshockopen.com/download/WineEntryForm20140607_distributed_0001.pdf">Participant Entry Form</a>
Thanks,
Greg
Hello,
We store our media files on Amazon S3 and we would like to use this plugin to force downloads for the media files.
Is there a way I can add a function to functions.php so that the plugin would first look at our Amazon bucket url instead of the local files?
E.g.
[video src="https://mybucket.s3.amazonaws.com/myvideo.mp4" /]
Thank you for the help,
Chris
]]>It seems the plugin has the opposite effect on iOS browsers with MP3s… Meaning that, when I tap the generated download link in Safari or Chrome, it essentially streams the file instead of loading it “normally”. The file doesn’t get start/end times displayed. Screenshot
Also, we have a few MP3s that are 40-ish minutes, but they start repeating around the 3 minute mark. Shrinking the file size helped, but didn’t resolve the issues.
Loading the files from their direct URLs works normally, so it’s not the files themselves.
Code:
[download label="download the audio file"]https://whatever.com/wp-content/uploads/series_part_1.mp3[/download]
Any advice?
]]>Clicking on the links directs to a 404. I’ve tried the following:
– Flushing permalinks
– Manually copying force-download.php to the wp-content directory
– Re-installing the plugin
Per earlier conversations in this forum, here is a publicly available page that I set up. There are multiple instances on the site where we’re trying to use the plugin, and all of them are having the problem. We’ve been using it for months with no issue, until recently – unfortunately I don’t have an exact date when it started.
Any ideas?
]]>Hi Drew,
How would I be able to tell from inside my template file (using the do_shortcode() function), if the user was able to complete the download successfully.
If it is a good download, I’d like to update some usermeta that says they should now have the file. Do I need to edit the force-download.php to return the status from the readfile( “$filename” ) function call or did you build something in?
Thanks, Ron
]]>Hello ??
I have a question if you plan upgrading the plugin to have support for files located in custom directories? Not managed by WordPress, not in wp-content
dir?
Hi,
I use an umlaut domain (https://www.xn--iseler-mhle-0hb.de/, displayed in browsers as https://www.iseler-mühle.de).
In WP, permalinks is set to “post name”.
1. When I use the shortcode like this:
[download label=”Download Sample MP3 ?”]https://www.xn--iseler-mhle-0hb.de/wp-content/uploads/sample.mp3[/download]
the link is displayed as:
https://www.iseler-mühle.de/download/sample.mp3
and when I click on it, it cannot be found.
2. When I use the shortcode like this:
[download label=”Download Sample MP3 ?”]https://www.iseler-mühle.de/wp-content/uploads/sample.mp3[/download]
the link is displayed as:
https://www.iseler-mühle.de/download/https://www.iseler-m%C3%BChle.de/wp-content/uploads/sample.mp3
and this is completely wrong.
How do I have to set this up with an umlaut domain?
Thanks,
Stephen
Hi There,
I am having issues getting this short code to work.
I have:
1. Ensured the force-download.php file has been uploaded to wp-content
2. Flushed re-write rules for permalinks (at least, as far as I am aware… I went to Settings>Permalinks and initiated a save)
The code I have entered in the Editor is as follows:
[download label="Download our Business Card:"]https://www.downhomeconstruction.ca/wordpress/wp-content/uploads/2014/02/dhc_business-card-300x170.jpg[/download]
When the link is clicked, it opens a new page with the following URL, which is completely blank and no download occurs:
https://www.downhomeconstruction.ca/wordpress/download/2014/02/dhc_business-card-300×170.jpg
Can you please advise?
Thanks,
TD
]]>Hi Drew,
Exact Same issue here on a site with pretty permalinks. The page I have the shortcode on is a private page at:
https://www.davidridgeway.co.uk/wordpress/download-shortcode-test-page.html
but when it is clicked it tries to take you to:
[audio src="https://www.davidridgeway.co.uk/wordpress/download/https://https://davidridgeway.co.uk/wordpress/wp-content/uploads/01-Relaxation.mp3" /]
I have:
flushed permalinks
deactivated all other plugins
Checked that forced-download.php is in wp-content folder
All to no avail. Any help here would be great, your plugin seems to fit an essential need of this site, one I’d like to employ a lot more, but I’m really struggling to get it to work.
Cheers!
]]>I have pretty permalinks enabled, but that does not seem to be effecting the media file.
File was uploaded as media.
Please see website page:
https://www.getmyparentshomesold.com/test-push-download
I have tried it two ways. Link leads to an error page. see above for notes.
Thanks!
]]>I am trying to setup the [download] shortcode within my template using the Advanced Custom Fields repeater field.
If I have a regular shortcode
<?php echo do_shortcode( "[download label='Download mp3']https://example.com/wordpress/wp-content/uploads/example.mp3[/download]"); ?>
Everything works fine.
But if I try to sub in the advanced custom fields, it prints out the url instead of allowing a download.
<?php echo do_shortcode( "[download]" . the_sub_field('download_link') . "[/download]"); ?>
Is there something I am doing wrong?
]]>I am having this same problem with the plugin that this user mentioned in this other thread: https://www.ads-software.com/support/topic/link-not-working-properly-1?replies=5#post-4986821
The behavior is that the file path has the characters “/download” in place of the actual file path for the upload. This will lead to a broken link unless I perform a workaround.
Example: When this is entered into the post editor..
[download]https://www.site.com/wp-content/uploads/2013/12/filename.pdf[/download]
..this sets the href property to
“https://www.site.com/download/2013/12/filename.pdf”
Please advise, thanks!
Cheers
Hi
i want to replace url that i NEED to provide inside the [download]and[/download] with my automatic get_attachment_url script:
$attachments = get_children( array(
'post_parent' => get_the_ID(),
'post_type' => 'attachment',
'numberposts' => 1, // show all -1
'post_status' => 'inherit',
'post_mime_type' => 'image',
'order' => 'ASC',
'orderby' => 'menu_order ASC'
) );
foreach ( $attachments as $attachment_id => $attachment ) { echo wp_get_attachment_url( $attachment_id );
}
?>
I want to use wp_get_attachment_url( $attachment_id ) instead of [download]ThisUrl[/download]
I want to use this download button on every post.. and i want it to be automatic.. i found how to get attachment URL .. now i need your suggestion.. My site is: and I want it to be Implemented in Content with all the other autotext i got..
Thanks in advance
Amer M.
Okay this may be a dumb question, but I can’t seem to get the download link to work properly. Basically I’ve typed in [download label="Download"]https://www.boundlessriver.com/wp-content/uploads/Silent%20Memories.pdf[/download]
for the download link. The link can be found here: https://boundlessriver.com/?page_id=97
When the download link is clicked, it redirects to https://boundlessriver.com/wp-content/force-download.php?file=uploads/https://Silent%20Memories.pdf which is obviously not where I intended the link to redirect to. I saved the permalink settings as suggested in previous posts to no avail. Any suggestions? I have a feeling I’m just doing something dumb ??
Thanks!
]]>Hello,
The plugin works like a charm, thanks for that.
I’m using it to create a download link for each entry of a list of attachments from the media library.
I had to include an onclick action for Ajax purposes (tracking downloads). So I modified the plugin output a bit, from
return sprintf( '<a href="%1$s" class="%2$s">%3$s</a>', esc_url( $url ), esc_attr( $class ), esc_attr( $label ) );
to
return sprintf( '<a href="%1$s" class="%2$s">%3$s</a>', esc_url( $url ), esc_attr( $class ), esc_attr( $label ), get_the_ID(), get_current_user_ID() );
around line 141 of download-shortcode.php.
It still does the trick, the URL includes the relevant onClick and the shortcode works.
But I also had to filter the list by category and used an Ajax action (‘load-filter’) for that.
When the new filtered list is displayed in Ajax, get_the_ID() doesn’t work anymore.
An idea about how to fix that ?
Thanks
]]>Hello,
I need to ad Google event tracking to the Download Shortcode. How would I go about this?
Thank you for your time.
]]>I clicked to install the files, and they were installed in the /wp-content/plugins/ directory. To be extra cautious (and to follow the letter of the download instructions) I also downloaded them into the /wp-content/ directory manually. However, I still cannot use it as I have an error at the top of my admin screen: “There is a problem with the download script in your /wp-content/ directory. You may need to manually upload it.” For now I have deactivated the plugin, but this is definitely a plugin I’d like to use. What did I do wrong in my installation?
Site address is https://www.nationalanthems.info.
]]>I’ve been digging around for a simple solution to including a “download original” link in NextGen image galleries. I’ve tried a few plugins with varying success, but found this one to work in the easiest to manage way.
I realize this is a pretty specific thing, combining two plugins, but I saw that others were trying to do this without much luck, so I thought it would be worth posting here.
Getting this to work took a few steps.
1. in the nextgen settings, be sure to store your images and galleries in the uploads folder.
2. create your own custom template for the nextgen gallery, and get that operating
3. insert the a download link into that template using do_shortcode to trigger the Download Shortcode plugin. My code looked like this:
<?php echo do_shortcode( "[download label='Download'] $image->imageURL [/download]" ); ?>
*big note:
I had about 4 galleries set up and displaying in a single album before I tried this approach. It did not seem to work at first, I think because the images were not originally uploaded within the uploads folder. Changing the nextgen preferences to store images and galleries in uploads did NOT correct the issue for OLD galleries. Any NEW galleries that were created after the change all operated correctly with the Force Download call. So, you should either make all the settings changes first, or be prepared to reupload all your old galleries to make the download links work.
Thanks for a useful plugin and informative support section here.
]]>I’ve activated this plug in on 2 different wordpress sites and get the exact same result on both with Firefox and Safari.
I enter this code in the html section:
[download label=”Audio 1 of 4″]https://www.takeyoutothetop.com/wp-content/uploads/2013/09/CreateContentFast1.mp3[/download]
This link appears on the page:
Audio 1 of 4 (it is blue and underlined in the site)
When I click on the link I get this:
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
The page is there, if you go to the link the audio plays. Not sure what the challenge is, please help!
]]>Hi – This is exactly what my customer was looking for so first of all, THANK YOU!!!
We are using your plugin to make a .pdf link ask the browser if the user would like to open or save the file. Initially, we had not changed from the default link to pretty links.
After installing your plugin and posting several files with download links, we decided to switch pretty links. After enabling them, the force download reverted to opening the media page where word press incorrectly identifies the file as an image and tries to display it in a lightbox.
I have tried deleting all of the posts and clearing the cache, however it does not seem to make a difference. The only thing I haven’t tried is uninstalling the plugin and re-installing.
This is possibly a WP issue, but just wondering if you have come across this and if you know of a fix?
Cheers,
Nick
]]>Hello.
Your plugin looks perfect for me as I am trying to get people to download an MP4 by clicking a button rather than them having to right click and chose “Save Link As” etc.
I host my files on a completely different site to the one where I would like the link placed. Currently, when I add in the shortcode I get linked to mysite.com/download/https://myhostingsite rather than straight to the file on my hosting site.
I apologise if this is a problem you’ve already answered or is in the notes within the plugin, but I don’t really understand php and so I’m not very good at following the support.
Many thanks in advance for any tips you may have!
Michael.
P.S. I think I’m using “pretty permalinks”
https://www.ads-software.com/extend/plugins/download-shortcode/
]]>Plugin was working great until today. Now displays 404 page. I tried deactivating all my plugins and only activating Download Shortcode, still nothing. I am using it to force download an .ies file on this page…
I have also tried using the plugin to force download a pdf but still isn’t working.
Any help would be great.
Thanks
https://www.ads-software.com/extend/plugins/download-shortcode/
]]>I’m using “pretty permalinks”; my .htaccess rewrite is enabled; I have no spaces in my link; I copied the “force download” plugin from “inc” folder to the WP-Content folder; I “manually” put in “[download]…[/download]” I even put in the php version as you instructed… STILL nothing happens!
Please help!
Here’s my site link:
https://www.ddogsburgersbeers.com — (Application section towards the middle of the homepage)
Please note that I’m already using shortcodes on this themed site already!
https://www.ads-software.com/extend/plugins/download-shortcode/
Moderated for unnecessary capitalization
]]>[Topic decapped – please do not “yell” here]
I am getting a 404 Page Not Found Error. I can’t do what you suggest in the FAQ for this, because it requires FTP server access, which I do not have in this particular case. And I cannot request it either.
What do you suggest.
https://www.ads-software.com/extend/plugins/download-shortcode/
]]>