Download Media from WordPress

This feature allows you to add a link to any WordPress page that will download media to the app that can be accessed offline.

This feature can be used to download course materials in a LearnDash app, or download video or audio on any post or page.

How is this different from the Media List?

The media list uses a WP-API route, and gets the download url from post meta. The feature described on this page is for WordPress (iframe) pages, and the download link is added in the WordPress post editor.

Video Tutorial

Note: AppPresser 4 uses a different way to display downloaded media in the app. Please click here.

Usage

To add a download link, visit any WordPress post or page on your site. Add a link that looks like this:

<a class="button app-download" href="https://mysite.com/wp-content/uploads/2018/12/my-media.mp4" data-download-title="Champion">Download Champion</a>

Attributes:

  1. class of "app-download" - this tells the app to download the media
  2. href - path to the media file
  3. data-download-title - title of the download, used to display in the app

Add the page to your app by visiting your app customizer => Menus => Add Item => WordPress/external link. Note: you cannot test downloads in the preview, you must build the app for your device.

Next you need a place to display the downloads in the app.

Enable Playback

Next, you must enable media playback on native devices. Visit the Settings tab, and check "Enable Media Playback", then save.

Display Downloads in App

Now that the file has been downloaded, you need a place to display it in the app.

Create a new custom page, choose the page builder, and add a WordPress downloads block.

Add the page to your menu, and save. This feature does not work in the browser preview, you must be on a device to test.