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="https://example.com/IdeaSpot-Ebook.pdf">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="https://example.com/IdeaSpot-Ebook.pdf" 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="https://ideaspot-class.com/wp-content/uploads/2020/07/IdeaSpot-Ebook.pdf" download="">Download Ebook</a></div>
</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

  • Zoho Email Setup Tutorial

    Zoho is a great email service to make your life easier. If you use your email on a daily basis and if you’ve got a decent amount of emails to deal with, having a reliable and user-friendly email client is an absolute must. Zoho can be a great alternative to your current email client and…

  • Black Friday Specials 2020

    LearnDash. LearnDash is offering a 50% discount on all plans! Starts at 7am Friday, Eastern Time. Coupon code: BF2020 (for Nov. 27th, 7AM-4PM EST Only)Coupon code: CM2020 (for Nov. 30th, 7AM-4PM EST Only) Get offer CloudWays 40% exclusive discount on all hosting plans for the next four months. Use the code: BFCM2020 Get offer Kadence…

  • WordOps Setup Tutorial

    In this tutorial, we set up a cheap VPS server, with a high performance optimized WordPress setup. Previously, this used to be something only a professional back end dev could really do. However, the WordPress community have created an excellent tool called WordOps which automates much of this process. You can try this method for…

  • Tutor LMS Tutorial

    You’ll learn to build an online course for free using WordPress and the Tutor LMS plugin. We use the free version in this video tutorial here: We also did a previous tutor LMS quick tutorial back in 2020: Why Tutor LMS This was the best LMS plugin we could find that includes a WooCommerce payment…