Quick download button with block and shortcode support.
The Quick Download Button plugin for WordPress allows you to easily integrate a simple but sophisticated download button into your posts and pages. This versatile plugin offers a range of features like a countdown timer, multiple button styles, and the ability to hide or show file size and extension. It supports both WordPress blocks and shortcodes, making it highly adaptable to your website’s needs.
** Shortcode **
To add a download button, open the post or page editor and paste the following shortcode example:
[quick_download_button title="Download" url="http://yoursite/wp-content/upload/fileto_download.pdf"]
Replace the url value with your file’s URL. Change the title value to customize the button text.
** Open link in a new window **
Set open_new_window to true to open the download link in a new tab, or false to open it in the same window.
[quick_download_button title="Download" open_new_window="true" url_external="https://google.com"]
** Set the button background color (color_bg=”#ffc107″), waiting timer (wait=15) and a custom message (msg=”Please wait 15 seconds”) **
[quick_download_button title="Download" color_bg="#ffc107" open_new_window="true" wait=15 msg="Please wait 15 seconds" url_external="https://google.com"]
** Link to an External URL **
To use external url, add url_external attribute.
[quick_download_button title="Download" url_external="https://google.com"]
** Auto Calculate File Size **
To have the plugin automatically generate the file size, ensure the file URL is in the WordPress upload directory and set file_size to 1.
[quick_download_button file_size="1" title="Download" url="http://yoursite/wp-content/upload/fileto_download.pdf"]
** Manually Add File Size **
You can manually specify the file size in the file_size attribute.
[quick_download_button file_size="14.5MB" title="Download" url="http://yoursite/wp-content/upload/fileto_download.pdf"]
** Hide File Extension Icon **
To display both the file extension icon and text, set extension and extension_text to 1.
[quick_download_button title="Download" filesize="1" extension="0" url="http://yoursite/wp-content/upload/fileto_download.pdf"]
** Display File Extension Icon and Text **
To showcase both the file extension icon and its text, set both the extension and extension_text attributes to 1.
[quick_download_button title="Download" filesize="1" extension="1" extension_text="1" url="http://yoursite/wp-content/upload/fileto_download.pdf"]
** Using the Gutenberg Block **
** Advanced Gutenberg Usage **
To hide the file size in the Gutenberg editor, utilize the ‘Additional CSS class(es)’ field in the block settings. Add ‘hide-size’ to this field to apply the effect.
To incorporate the download button within a theme file, use the following code with your specified attributes and values:
echo do_shortcode('[quick_download_button title="Download" url="http://yoursite/wp-content/upload/fileto_download.pdf"]');
If you find this plugin helpful and would like to support its ongoing development, please consider Donate
To contribute and improve this plugin please visit the Git repo.
Yes, it can.
Yes, you can use this plugin with shortcodes in the Classic Editor.
Yes, it displays the download file size.
For shortcodes, leave the msg attribute blank. Example:
[quick_download_button button_type="small" msg="" title="Download Now" url_external="http://external-url-here/"]
For blocks, under ‘Countdown Settings’, select the time to wait (e.g., 15 for 15 seconds) and remove the default message from the message box.
Change button style with ‘button_type’:
[quick_download_button button_type="small" title="Download Now" url_external="http://external-url-here/"]
Add file from your WordPress site with url:
[quick_download_button button_type="mid" title="Download Now" url="http://yoursite/wp-content/uploads/yourfile.pdf"]
Add border radius with ‘border_radius’:
[quick_download_button button_type="small" border_radius="9" title="Download Now" url_external="http://external-url-here/"]
Change icon color with color_icon_dark:
[quick_download_button button_type="large" color_icon_dark="false" color_bg="black" color_font="#FFF" title="Download Now" url_external="http://external-url-here/"]
Add countdown and wait message with wait and msg:
[quick_download_button button_type="basic" wait="10" msg="Please wait..." title="Download Now" url_external="http://external-url-here/"]
Manually add file size with file_size:
[quick_download_button button_type="basic" wait="10" msg="Please wait..." file_size="40MB" title="Download Now" url_external="http://external-url-here/"]
Hide file extension with extension:
[quick_download_button button_type="basic" extension="0" title="Download Now" url_external="http://external-url-here/"]
Add border style:
[quick_download_button button_type="small" border_width="2" border_style="solid" border_color="black" title="Download Now" url_external="http://external-url-here/"]
Change alignment with align:
[quick_download_button button_type="small" align="left" title="Download Now" url_external="http://external-url-here/"]