/** * @article Better attachment link * practices for WordPress * * @since December 18, 2010 * @package Wordpress * * Should images in WordPress posts * link to [file], [attachment-page], * or [none]? Some thoughts. * * @tags attachments * @comments % comment * */
I recently answered a support question on one of the WordPress question and answer sites about forcing pdf links to download in Acrobat or another pdf application, rather than opening in the browser window. I came up with what I thought was a pretty elegant solution, which involved creating a pdf.php template which set the HTTP headers necessary to force a download, rather than allowing the browser to attempt to render the file.