i have attacment.php like this.

<?php  

if ( $attachments = get_children( array(  
'post_type' => 'attachment',  
'post_mime_type'=>'image',  
'numberposts' => 1,  
'post_status' => null,  
'post_parent' => $post->ID  
)));
foreach ($attachments as $attachment) {  
echo wp_get_attachment_link( $attachment->ID, '' , false, true, 'Download This Wallpaper');  
}  
?> 

this code will print attachment link.

My question is: How to make this link to be single click to download image and save to computer user?

3 Answers
3

It is possible by using the plugin:

http://wordpress.org/extend/plugins/download-shortcode/

I am here to assist you since I am using the same functionnality in my website (force dowloading of post attachements)

Leave a Reply

Your email address will not be published. Required fields are marked *