Notice: Function register_rest_route was called incorrectly. REST API routes must be registered on the rest_api_init action. Please see Debugging in WordPress for more information. (This message was added in version 5.1.0.) in /home/thrivethemes/dev/thrivethemes/staging.thrivethemes.com/wp-includes/functions.php on line 6078

Notice: Function register_rest_route was called incorrectly. The REST API route definition for membership/v1/tags/schema is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.) in /home/thrivethemes/dev/thrivethemes/staging.thrivethemes.com/wp-includes/functions.php on line 6078

Notice: Function register_rest_route was called incorrectly. The REST API route definition for membership/v1/tags/activity/(?P[\d]+)/(?P[\d]+) is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.) in /home/thrivethemes/dev/thrivethemes/staging.thrivethemes.com/wp-includes/functions.php on line 6078

Notice: Function register_rest_route was called incorrectly. The REST API route definition for tve-dash/v1/growth-tools is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.) in /home/thrivethemes/dev/thrivethemes/staging.thrivethemes.com/wp-includes/functions.php on line 6078

Notice: Function register_rest_route was called incorrectly. The REST API route definition for tve-dash/v1/growth-tools is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.) in /home/thrivethemes/dev/thrivethemes/staging.thrivethemes.com/wp-includes/functions.php on line 6078
Creating a Button that Immediately Starts the Download of a File - Thrive Themes
  1. Home
  2. Knowledge Base
  3. Thrive Architect
  4. Thrive Architect Functionalities
  5. Creating a Button that Immediately Starts the Download of a File

Creating a Button that Immediately Starts the Download of a File

In some cases, you might want to attach a document on your site that starts downloading upon the click of a button.

This can be achieved by linking the file to a button and, when someone clicks on it, the download starts immediately.

There is no specific option that can be used for this. However you are able to set the download attribute in the HTML of the button.

Here’s how to do that:

Access the page/post (or opt-in, if using Thrive Leads/Thrive Ultimatum pop-ups)

Once you’ve opened one of the Thrive editors, you can add a “Button” element to the page. To do that, proceed just like in the case of any Thrive Architect element. Go to the right sidebar and click on the plus sign:

Then, look for the “Button” element or search for it in the search bar:

Next, you can drag and drop it anywhere you want it to be placed on your page:

After you customize the “Button” element, go to the “Button Link” section and insert the URL of the file in the “Target URL” field:

Note: The download will start only if the file URL is secure (https).

Now, it will be easier to find the button in the HTML of the page and add the download attribute to it.

Open the HTML Editor

Next, you have to open the HTML editor of the page/post. For that, go to the right sidebar and click on “Settings”:

Go to “Advanced Settings“:

And open the page source (HTML):

Add the download attribute to the button <div>

Now use ctrl+F and search for the link you’ve added for the button:

Once you have found the button <div> , go ahead and add the download parameter at the end of it:

Make sure you save the HTML source page:

And, after returning to the Thrive editor, you can go ahead and save the page as well:

If the link of the file is correct, the click on the button will now start the download of the file, instead of simply opening it in a new tab.

Hopefully, this short article was useful to you. Make sure to check out our knowledge base if you need more information on Thrive Architect or any other Thrive products.

Was this article helpful?

Related Articles

>