Additional menu

Get MemberPress today! Start getting paid for the content you create! Get MemberPress Now
  1. Home
  2. Knowledge Base
  3. Courses
  4. Creating Courses
  5. How to Edit Lessons with ReadyLaunch™ and a Page Builder
  1. Home
  2. Knowledge Base
  3. Advanced Topics
  4. Custom Codes
  5. Customizing Courses
  6. How to Edit Lessons with ReadyLaunch™ and a Page Builder

How to Edit Lessons with ReadyLaunch™ and a Page Builder

MemberPress ReadyLaunch™ strips out extra Scripts and Styles that are enqueued by other plugins and your theme. This is necessary to ensure a clean classroom look and feel. If you want to edit your lessons and course overview with a page builder (like Elementor) you have two options.

  1. Turn off ReadyLaunch™ for Courses
  2. Enable Extra Scripts and Styles with ReadyLaunch™ Templates

Turn off ReadyLaunch™ for Courses

If you want to turn off ReadyLaunch™ for Courses, and instead just use your current theme, the directions to do so are below. But be aware that some of the functionality of course navigation and style won't be available for you to use. 

  1. Go to MemberPress->Settings
  2. Select the “ReadyLuanch™” tab
  3. Switch the Courses toggle to off.
  4. Click Update Options to save your changes. 

Enable Extra Scripts and Styles with ReadyLaunch™ Templates

If you want to keep the clean look and feel of the ReadyLaunch™ templates and all the functionality, you can enable extra scripts and styles using some settings and custom code.

Note: If you are experiencing issues with blocks losing styling, videos not playing, or similar issues on your courses, a possible reason could be that your WP Footer Hook is disabled. Enabling it could solve these issues.

  1. Go to MemberPress->Settings
  2. Select the “ReadyLaunch™” tab
  3. Click the “Customize” link next to Courses (or toggle the switch to on if it is
  4. Set WP Footer Hook to “Enabled”

  5. Press the “Update” button to save your changes.

Note: If you previously added a code snippet to enable the footer (like the one below) you will need to remove this code from your themes or snippet plugin. 

add_action(‘mpcs_courses_footer', ‘do_wordpress_footer');
function do_wordpress_footer() {
  do_action(‘wp_footer');
}

  1. Next, if your page builder is listed below under the Page Builder Scripts heading, you can use the code snippet provided there. 
  2. If your page builder is not listed, firstly, you'll need to determine whether style scripts need to be loaded. Secondly, you'll need to find the handle your specific page builder uses. Finding the handle can be a difficult process, so we recommend you contact the page builders' development team for assistance.  Then, replace the YOUR_STYLE_HANDLE_HERE in the code example below, with your page guilder handle. Add the modified code snippet to your site:
add_filter('mpcs_classroom_style_handles', function($allowed_handles){
     $allowed_handles[] = 'YOUR_STYLE_HANDLE_HERE';
     return $allowed_handles;
});

You can add code snippets to either your functions.php file (if you have a child theme) or a plugin that allows you to add PHP code like the WPCode plugin (please check this article for details: How to add custom code snippets in WPCode).

Page Builder Scripts

We don't have all the scripts needed for all the page builders. However, we have found that customers have had success with the ones listed below. If you discover a list that works for your page builder and would like it included here, please
contact support.

Elementor

add_filter( 'mpcs_classroom_style_handles', function( $allowed_handles ) {
  $allowed_handles[] = 'elementor-icons';
  $allowed_handles[] = 'elementor-frontend';
  $allowed_handles[] = 'elementor-post-' . get_the_ID();
  $allowed_handles[] = 'elementor-pro';
  $allowed_handles[] = 'elementor-gallery';
  $allowed_handles[] = 'elementor-icons-fa-solid';
  $allowed_handles[] = 'elementor-icons-fa-brands';
  $allowed_handles[] = 'elementor-icons-fa-regular';
  $allowed_handles[] = 'prismjs_style';
  $allowed_handles[] = 'editor-preview';
  $allowed_handles[] = 'pro-editor-preview';
  $allowed_handles[] = 'flatpickr';
  $allowed_handles[] = 'select2';
  $allowed_handles[] = 'elementor-select2';
  $allowed_handles[] = 'elementor-pro-admin';
  
  return $allowed_handles;
});
Was this article helpful?

Related Articles

computer girl

Get MemberPress today!

Start getting paid for the content you create.