WordPress.org

Ready to get started?Download WordPress

Forums

How do I make image in post when clicked, download a file? (5 posts)

  1. deelillcutie
    Member
    Posted 5 years ago #

    Hoping someone can help, I have searched forums, FAQ & googled for 2 days without success.

    I have a digital scrap blog website powered by WordPress. I use Maxthon Browser, My Host is Host Monster, I have unlimited storage/bandwith. I use Core FTP Lite.

    What I want is to create a post with text, and have an image of a scrapkit which has a download here link below the image, so that when the link is clicked a new blank window opens and a 'Download File' box pops up for people to save & download it.

    I tested and am able to my create post, add the image, FTP'd my file 1.35mb to wp-content/uploads, then edited my image, inserted the link I got from FTP into the Link URL, updated, previewed post.

    I was able to see my post & image but when I clicked on 'download here' a new blank page with error 404 opens.

    What am I doing wrong?

    Thank you in advance Dee.

  2. Samuel B
    moderator
    Posted 5 years ago #

    Inside a post use this format:

    [caption id="" align="alignnone" width="500" caption="Download Here"]<a href="/wp-content/uploads/whateverfiletodownload.pdf"><img alt="alt_text_here" src="/wp-content/uploads/whateverimage.jpg" title="My Title of Image" width="500" height="331" /></a>[/caption]

    of course replace height and width(s) of images with your real ones and the url's with your real ones

  3. deelillcutie
    Member
    Posted 5 years ago #

    Thank you Samboll, it didn't work because I have the scrap zipped inside a .rar (winrar) file, so instead of .pdf I put .rar

    With my image it's not a jpg but png so I put .png and no joy.

    My website is http://dees-deelights.com if you have a moment to see what I mean. Thank you, Dee

  4. deelillcutie
    Member
    Posted 5 years ago #

    I reuploaded the file and I can see the link on the page, when I click I can download the file...much appreciation to samboll for your assistance :)

  5. Samuel B
    moderator
    Posted 5 years ago #

    i showed my wife your site and she loves it.
    I'm glad you got it working.

Topic Closed

This topic has been closed to new replies.

About this Topic