banner



How To Put A Download Link In Wordpress

Disclosure: This post may comprise affiliate links. Purchasing a product through one of these links generates a commission for the states at no additional expense to yous.

This is the kind of mail I honey to write.

Some tutorials comprise complicated steps, and sometimes I wonder if people will be happy with the stop solution.

Merely today, you're going to learn a really elementary and versatile manner to add together download links to WordPress.

The best part almost this method is that you lot can reuse it anywhere on your site. Using these aforementioned steps, you tin can add download links to your:

  • Posts
  • Pages
  • Widgets
  • Menu

That's all four places you take content control on a WordPress site.

Now enough of the build-upwards, let's dive into the steps to create these links.

The same steps are covered in this video tutorial if yous prefer to learn that way.

Subscribe to Compete Themes on Youtube

To add a download link (or push), the first affair you need is a URL pointing to the file that people volition download.

Get the file URL

If yous already have a file hosted somewhere online you can utilise that URL, but otherwise, you can upload the file to your Media Library.

You lot might remember that the Media Library is only for images, but that'south not the case. You tin can upload aught files, MP3s, PDFs – any file blazon you lot desire.

Visit the Media Library > Add together New menu, and use the Select Files button or elevate-and-driblet your file into the screen to upload information technology.

Add To Media Library

Once you upload the file, you'll see an Edit link on the right side of the screen.

Edit Media Link

Click that link and you'll be taken to the Edit Media folio.

Since you lot've uploaded your file to your site, it at present has a publicly attainable accost. In the Edit Media folio, you can discover that accost in the File URL section pictured here:

Edit Media

While the whole URL may not be visible, you tin can triple-click to highlight the unabridged URL and and so copy information technology to your clipboard.

Pro tip: double-clicking volition select an entire give-and-take, simply triple-clicking will select an entire field. You can use this play a trick on on near websites and applications.

Now that you've got the URL pointing to your file, the next step is to link to it somewhere on your site.

You can repeat the post-obit steps for any part of your site, only I'll be using a post equally my case.

Add together a link to your post

I'thousand sure you've added tons of regular links in your posts and pages already. The process for creating a download link is only a lilliputian bit different.

Commencement by creating a new paragraph block and add together some text to it like "Download now." Then click the link icon to open upwardly the URL input box.

Add Link

Next, paste in the file URL and hit Enter.

At this signal, you've got a regular link pointing to your download.

Normal Link

Now at that place are two different paths you an have.

First, you tin go out the link similar this and simply add a message below telling your visitors to correct-click and choose the "Save Link as…" option to download the file.

Save Link As

This arroyo can be neat for PDFs because it gives visitors the selection to either click the link to view the PDF in-browser or right-click to download it.

Additionally, if you lot link to a zippo file, in particular, it will download automatically when they click on it, so no further steps are needed.

If you lot've uploaded a PDF or another file type that doesn't download automatically, here'southward how you lot can make the file download when a visitor clicks the link.

How to make the file download automatically

WordPress doesn't take an option for this next part, and then we'll need to make a small edit to the HTML on our own.

First by selecting the paragraph block with your download link in it. Next, click on the More than options icon (the three dots), and then select the Edit as HTML pick.

Edit As Html

This is going to expose the HTML for the block which volition look something like this:

Link Html

You tin see the "p" tags wrapping everything considering it'due south a paragraph, and the "a" chemical element is inside which is the link chemical element.

Honestly, if it looks like a bunch of weird nonsense to y'all that's fine because you only need to make ane minor edit.

You're going to add a download aspect into the link element, like this:

Download Attribute

Start by typing the exact same text into your link element. Make sure it shows upward right after the "a" and has a space on both sides.

The word "image" inside the quotes is going to be the filename. And then if you uploaded a PDF chosen "2020 Financial Study" then you would want to enter the text "2020-financial-report." Then when someone clicks on this link, they'll automatically download a PDF named 2020-financial-written report.pdf.

When you're done, click the More options icon once more and choose the Edit visually option.

Edit Visually

This will return the paragraph to its normal presentation in the editor.

Now when yous visit your site, the download link will look identical, simply if someone clicks on it, the file volition download automatically no thing what kind of file information technology is.

File Downloading

Yous can use this technique to add as many download links to your post equally yous want. And now since yous've seen how the HTML works, y'all can use evidently HTML in the Custom HTML widget to add a download link to your sidebar or anywhere else your theme allows widgets.

As for your menu, you tin't edit the HTML directly, then if you want to add a download link there, use URL pointing to a zip file to enforce an automatic download.

Bonus: create a download push

This side by side part might accident your mind.

A push is simply a link styled to look like a push.

Basically, y'all add a background color, some padding, and mayhap some curved corners and voila, your link is now a push.

So it should come equally no surprise then that the exact same steps shared here work for buttons also.

All you demand to do is add a button block to your site and repeat the same steps. Buttons take a link field and the aforementioned Edit as HTML option.

Add Link Button

While a normal link works fine, a push button is clearer since people are used to clicking them to download files. Plus, it looks a lot nicer.

What next

As you've learned, adding download links to WordPress is pretty piece of cake. In fact, if y'all are linking to zip files, the steps are the aforementioned every bit linking to a normal webpage.

With this noesis, yous can create download links in your posts and pages, and your widgets. This allows y'all to place downloads near everywhere on your site.

And if yous desire to get really fancy, you can supervene upon your boring old link with a fresh looking push cake. Now that WordPress supports multiple buttons in a single block, you can play around with different layouts and download options for your visitors.

If you're on a roll, then read this mail next to find some more than awesome ways to customize your website:

31 Easy Ways to Customize Your WordPress Website

If this tutorial helped y'all add a download link to your WordPress website, please share information technology before y'all go.

Ben Sibley

Ben Sibley is a WordPress theme designer & developer, and founder of Compete Themes.

How To Put A Download Link In Wordpress,

Source: https://www.competethemes.com/blog/wordpress-download-link/

Posted by: laratheall1965.blogspot.com

0 Response to "How To Put A Download Link In Wordpress"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel