Hello again,
I am using these shortcodes:
[download label=”My Other Link”]http://qtdentallab.com/wp-content/uploads/RX-Form[/download]
[download]http://qtdentallab.com/wp-content/uploads/RX-Form[/download]
But when I update my page they turn into links that just refresh the page when clicked on.
Thanks,
Kelly
Hi Kelly,
Make sure to append the file extension with the filename in your link URL. So for instance,
http://qtdentallab.com/wp-content/uploads/RX-Form
Should actually be:
http://qtdentallab.com/wp-content/uploads/RX-Form.pdf
Also, you may need to visit Settings > Permalinks to flush your site’s rewrite rules.
Hi Drew,
Thank you for letting me know my shortcode address was incorrect. Now my page says “No Results Found”. I am still searching for a soution.
Best,
Kelly
Hi Kelly,
Sorry you’re still having troubles.
Two things:
- Can you provide me with a live URL to a page with one of your download links on it?
- Have you visited Settings > Permalinks and re-saved your settings? The plugin needs to be able to write a rewrite rule to your site’s .htaccess file via WordPress.
Hi Kevin,
Yes, it is on http://qtdentallab.com/rx-form/
No I haven’t changed the settings in the permalinks, I was using non-pretty permalinks. I think I tried looking for instructions on how to change the permalinks setting but could not find.
Best Regards,
Kelly
(The shortcode links are on the very bottom of the page)
No I haven’t changed the settings in the permalinks, I was using non-pretty permalinks.
The reason I ask is because the rest of your site is already using pretty permalinks. If you want your links to be rewritten, for instance using this:
[download label="My Other Link"]http://qtdentallab.com/wp-content/uploads/2013/RX-Form.pdf[/download]
Would produce a link titled “My Other Link” with a URL of:
http://qtdentallab.com/download/2013/RX-Form.pdf
But that above link will only work if you visit Settings > Permalinks and re-save your settings.
On the other hand:
If you want to disable URL rewriting for downloads even though the rest of your site is using pretty permalinks, add the following to your theme’s functions.php file:
add_filter( 'fds_rewrite_urls', '__return_false' );
Using the above filter, using this shortcode:
[download label="My Other Link"]http://qtdentallab.com/wp-content/uploads/2013/RX-Form.pdf[/download]
Would generate a link titled “My Other Link” with a URL of:
http://qtdentallab.com/wp-content/force-download.php?file=uploads/2013/RX-Form.pdf
I went to Settings>Permalinks and clicked “Save Changes”. I tried using [download label=”My Other Link”]http://qtdentallab.com/wp-content/uploads/2013/RX-Form.pdf[/download] but that didn’t become a download link. It says I should update my htaccess file but I don’t know how or why. I’m really sorry but I am so confused, I’m not a programmer. On this URL is an image of my permalinks setting page. What do I need to change here? Thank you for your help.
Your .htaccess
file lives in your site’s root directory. You can download it via FTP and open it in a text editor. Once you have it open, copy the rules from the box on Settings > Permalinks into it. Re-save it, and upload it/overwrite it via FTP.
You can also find more in-depth information here: http://codex.wordpress.org/Using_Permalinks#Fixing_.htaccess_Generation_Issues
Should I do this to get your plugin to work? Is there a video tutorial on this? Thanks again.
Kelly,
At this point, we’ve moved beyond support for my plugin. At the link I’ve provided above, there are directions for how to edit your site’s .htaccess
file. If you cannot get access to edit your .htaccess to ensure that download links will be rewritten, you should add the following line to your theme’s functions.php file via Appearance > Editor > functions.php:
add_filter( 'fds_rewrite_urls', '__return_false' );