PHP value for download link? Trying to link EDD thumbnail to download.
-
Hello!
Our non-profit has been using a modified version of EDD and EDD Free Link on our site for a while now (we are very grateful for its existence).
Recently, I’ve been trying to modify the code of EDD and/or EDD Free Link so that the EDD thumbnail image, when clicked, also opens the file (in addition to the download button itself).
An example can be seen here: https://kidzneurosciencecenter.com/walksafe-parents/
Unfortunately, I’ve found this a bit difficult to implement in PHP.
From what I’ve been able to establish, the following PHP from
download_link.php
generates the URL to the file:<a href="<?php echo esc_url($download_url); ?>"
. It works fine when used indownload_link.php
, but not if I try to implement the code directly into EDD’sshortcode-content-image.php
.I assume there is a prerequisite bit of code to generate the variable
$download_url
(which I see in `class.EddFreeLinkPlugin.php’), but I’ve yet to figure it out in its entirety.Any chance the variable to write the URL is easier than I’m making it out to be? I struggle a bit at .PHP; any help would be greatly appreciated.
Thank you!
-Kurt
https://www.ads-software.com/plugins/easy-digital-downloads-free-link/
- The topic ‘PHP value for download link? Trying to link EDD thumbnail to download.’ is closed to new replies.