LearnPress is a free WordPress LMS plugin from ThimPress for building and selling courses. Because LearnPress runs on WordPress, you can use the SmartVideo WordPress plugin’s built-in [smartvideo] shortcode to put ad-free, optimized video in your lessons. There’s no LearnPress-specific add-on or setting on our side. SmartVideo serves the video inside the lesson content, and LearnPress handles the course, enrollment, and curriculum as usual.
If you don’t have a SmartVideo account yet, create one at dash.swarmify.com/signup. Once you’re registered, head back here to get set up.
Step 1: Install the SmartVideo WordPress plugin
- In your WordPress admin, go to Plugins → Add New.
- Search for SmartVideo and install the plugin published by Swarmify.
- Activate the plugin.
- Copy the Swarm CDN Key from the Dashboard tab, the first screen after you log in to your Swarmify Dashboard.
- From the WordPress admin sidebar, click SmartVideo, paste your unique Swarm CDN Key into the field on the Setup tab, and click Enable SmartVideo.
The plugin handles the JavaScript snippet for you, so you don’t need to paste anything into your theme header.
Already have lesson videos on Vimeo? With the plugin activated and Vimeo auto-conversion on, existing Vimeo embeds convert automatically - no embed code changes required. SmartVideo imports Vimeo videos whose Who can watch setting is Anyone; password-protected and Only me videos stay on Vimeo. Open each lesson page containing a Vimeo embed once while logged in. See Migrating from Vimeo to SmartVideo.
Step 2: Add the [smartvideo] shortcode to your lesson
- In WordPress, go to LearnPress → Lessons and open the lesson, or open the course (LearnPress → Courses), scroll to Curriculum, and open the lesson from there. To make a new one, click Add A New Lesson under LearnPress → Lessons.
- In the lesson’s Content section, paste the shortcode where you want the video:
[smartvideo src="https://your-video.example.com/file.mp4"]
- Update the lesson.
Replace the src value with the direct URL of your hosted MP4 (your own server, S3, Dropbox direct link, your WordPress Media Library, etc.). Swarmify fetches, optimizes, and delivers it from there.
The source must return the video bytes to an anonymous request, without a login, and remain available for as long as the video is embedded. Do not use an expiring or signed URL.
That source URL is written into your page’s HTML, so anyone viewing your page source can find it. If keeping the original out of reach matters to you, upload the video to your SmartVideo Library and embed the swarmify:// reference instead.
LearnPress’s own lesson docs describe two ways to add video to a lesson: upload it with the Add Media button, or paste a video URL into the lesson content. The shortcode goes in the same Content section. If your lesson editor shows a block inserter, you can add the SmartVideo block there instead of using the shortcode.
If the lesson isn’t in a course yet, open the course, go to Curriculum, click Select items, choose the lesson, and click Add. LearnPress only lists lessons you created that aren’t already assigned to a course.
Optional shortcode attributes
If you need them, the [smartvideo] shortcode supports the same attributes as the HTML tag:
[smartvideo src="https://your-video.example.com/file.mp4"
poster="https://your-video.example.com/cover.jpg"
controls="true"]
Supported attributes: poster, width, height, aspect_ratio, responsive, autoplay, muted, loop, controls, playsinline, preload.
What happens after I install?
The first time a lesson loads, Swarmify fetches your source MP4 and starts re-encoding it for optimized delivery. This usually takes about as long as the video runs, so a 10-minute lesson video takes about 10 minutes. While it’s processing, the player still works - it just serves the original until the optimized version is ready.
If a lesson video doesn’t appear after publishing:
- Make sure the
srcURL points to a direct video file (.mp4,.webm, etc.), not a YouTube or Vimeo page URL. - Check that the SmartVideo plugin is activated and connected under SmartVideo in your WordPress admin sidebar.
- Preview the lesson as a student and as a logged-out visitor, not just as an admin. LearnPress lets you mark a lesson as previewable before purchase, so check both views.
- If the player loads on other pages but not on lessons, open SmartVideo in your WordPress admin sidebar, go to the Settings tab, and set Conditional script loading to Off. Standard mode decides per page from the saved content of the page being viewed. We haven’t tested which page LearnPress hands the plugin for a lesson, so Off is the safe setting: it loads the player on every page.
- If a video added to the lesson doesn’t display, check the settings of any lazy-load plugin you run. LearnPress’s docs say to turn off lazy load on the
iframetag. - If a lesson page returns a 404, LearnPress says to check that Settings → Permalinks is set to Post name and that the lesson is published.
Using LearnDash instead? See Install SmartVideo on LearnDash.
Related articles
- Install SmartVideo on WordPress
- Install SmartVideo on LifterLMS
- Install SmartVideo on TutorLMS
- How to configure SmartVideo to work with LearnDash Video Progression
Hosting course video? See the LMS video hosting overview.
Keywords: learnpress, learn press, thimpress, lms, course, lesson, shortcode, [smartvideo], wordpress lms, online course