How to Create Download Links in WordPress

Let’s learnhHow to create download links in WordPress.

In our YouTube tutorial we show you 3 methods to do this. Using both the standard WordPress editor (Gutenberg) and also the free version of the Elementor page builder.

Three Methods of adding download links:

  • ZIP folder method
  • WordPress File block
  • Adding a ‘download’ attribute to a link (good for images and documents, e.g. PDF)

These are all pretty straight forward.

Except for the third one. Trying to do this in the wordpress editor requires a little HTML.

By default the HTML for a button link will look like this.

<div class="wp-block-button"><a class="wp-block-button__link" href="">Download Ebook</a></div>

You just need to copy the standard button HTML and add the ‘download’ attribute text before the angle bracket > at the end of the link. So our example now looks like this:

<div class="wp-block-button"><a class="wp-block-button__link" href="" download>Download Ebook</a></div>

Finally, to center the button in our layout, you can wrap the button with a center alignment division. Now our HTML looks like this:

<div style="text-align:center;">
<div class="wp-block-button"><a class="wp-block-button__link" href="" download="">Download Ebook</a></div>

It’s definetly a skill worth learning. Even if you don’t try any other HTML, just being able to center some things is a valuable skill to know.

Similar Posts