How to Create an Online Course and Community on WordPress

Step-by-step WordPress tutorial for adding an online course to a WordPress page with Embedin. Set up the course, add a Custom HTML block, allow your domain, and troubleshoot.

Embedin course and community preview for a WordPress page

WordPress can host your course pages, lessons, and community links, and Embedin can deliver the course experience inside a page you already run. This tutorial covers creating the course, placing the embed in a WordPress page with a Custom HTML block, allowing your domain, and testing the result as a learner.

Before you start

  • A WordPress site you can edit, with permission to add blocks to a page.
  • An Embedin account and a course with at least one published lesson.
  • A plan for the page: a short introduction, what learners will get, and where the course sits on the page.

1. Create your course in Embedin

Sign in to Embedin, create a course, and add your modules and lessons. Publish the content you are ready to share. Open the course settings and copy the Course ID. You will paste it into the embed snippet in three places.

2. Allow your WordPress domain

Before the course loads on your site, add the domain where it will appear to the course's allowed domains in Embedin. Add your production hostname first. If visitors can reach the site with and without www, add both. If you test on a staging site, add that hostname too.

3. Add a Custom HTML block

In the WordPress block editor, open the page where the course should appear, add a Custom HTML block, and paste the snippet below. Replace YOUR_COURSE_ID in all three places with your Course ID.

<div id="YOUR_COURSE_ID" data-courseid="YOUR_COURSE_ID"></div>
<script type="module" data-courseid="YOUR_COURSE_ID" src="https://embed.embedin.com/course.js"></script>

Place the block below your own introduction. Learners see the course in context, with the page copy explaining what the course covers and who it is for.

4. Write the surrounding page copy

The embedded course is not a replacement for a useful page. Add an original heading, a short description of the course outcomes, and any pricing or enrollment details in regular WordPress blocks above or below the embed. This copy helps learners decide to enroll and gives search engines readable text on the page.

5. Publish and test on the live page

Update the page and open the public URL. Check the course on desktop and on a phone. Sign in as a learner, or use an enrolled test account, and confirm that lessons load and play. If you changed domains, reload after saving the allowed domains list.

Troubleshooting

  • The course does not appear on the live page: Confirm the Course ID is the same in all three places and that the published hostname is in the allowed domains.
  • The block is blank in the editor: Some editor previews block external scripts or use a different host. Check the published page instead.
  • The script is removed when you save: Some hosting plans, plugins, or security settings strip custom scripts. Check your plugin and security settings, and confirm the editor allows external module scripts.
  • Only one hostname works: Each hostname is checked separately. Add both www and non-www versions, plus any staging domain.

Frequently asked questions

Do I need to know how to code?

Not for the basic setup. Copy the Course ID, paste the snippet into a Custom HTML block, and update the allowed domains. If you use a page builder, choose an element that accepts HTML and external scripts.

Can I add the course to an existing page?

Yes. Add the Custom HTML block to any page you already publish. Your existing navigation and content stay in place.

Can learners see the course on mobile?

Test the published page on a phone before inviting learners. Layout depends on your theme and the width of the block you place the course in.

Ready to set up your course? See how Embedin works with WordPress or open Embedin to create your course.

Published

More guides