Using Divi Builder with Lifter LMS Courses

This post may contain referral links which may earn a commission for this site

The free Lifter LMS plugin lets you create and sell courses on your WordPress site. This post has a few thoughts on using Lifter LMS with the Divi Theme.

Divi Booster doesn't currently have any features targeting LifterLMS specifically. It used to be useful for enabling the Divi Builder on LifterLMS courses (as described below), but this functionality is now included in Divi itself. Divi Booster does, however, include plenty of options for customizing Divi which may be of general use on your Divi / LifterLMS site. You can see the full Divi Booster feature list here.

​You can enable Divi Builder on Lifter LMS custom post types within the Divi, by going to "Divi > Theme Options > Builder > Post Type Integration > Enable Divi Builder on Post Types" and enabling each of the LifterLMS post types.

​One option for integrating Divi and LifterLMS, which I haven't yet tested myself, is the free Lifti add-on for LifterLMS. It offers various features for improving the compatibility between Divi and LIfterLMS.

I'm always happy to try to solve problems people are having with Divi, including compatibility issues with plugins such as LifterLMS. If you have any questions about how to get something looking / working a certain way, please feel free to give me a shout.

Enabling the Divi Builder on Lifter LMS lessons

I've previously written about how you can enable the Divi Builder on custom post types. There are some requirements for this to work, namely that the custom post type supports the standard WordPress editor box, which fortunately applies in this case. So the method described in that post will work on Lifter LMS lesson pages.

My Divi Booster plugin includes an option to enable the Divi Builder on custom post types, including Lifter LMS lesson pages, without the need to mess around with code.

You will find the option in Divi Booster, under "Divi Builder > Standard Builder > Enable Divi Builder on Custom Post Types".

Enabling the Divi Builder on Lifter LMS courses

Unfortunately, the method described in that post won't work on Lifter LMS course pages. While I won't go overly deep into the details, it's due to the non-standard way in which they use the WordPress editor box.

Fortunately, it's possible to work around this. The following PHP code will make the necessary changes to enable to the Divi Builder to be used on Lifter LMS course pages:

// Set up once lifterlms loaded
function dbf_lifterlms_init() {
	add_filter('et_builder_post_types', 'dbf_lifterlms_add_post_types');
	add_action('admin_head', 'dbf_lifterlms_admin_head', 11); // Run after main booster feature
}
add_action('lifterlms_loaded', 'dbf_lifterlms_init');

/* Enable Divi Builder on all post types with an editor box */
function dbf_lifterlms_add_post_types($post_types) {
	if (in_array('course', get_post_types())) {
		$post_types[] = 'course';
	} 
	return $post_types;
}

/* Ensure Divi Builder appears in correct location */
function dbf_lifterlms_admin_head() { 
	global $post;
	$s = get_current_screen();
	if(!empty($s->post_type) and $s->post_type=='course') { 
?>
<script>
jQuery(function($){
	$('.et_pb_toggle_builder_wrapper').insertBefore($('#wp-content-wrap')).show();
	$('#et_pb_layout').insertAfter($('#wp-content-wrap'));
	
	$(document).on('mouseup', '#et_pb_toggle_builder:not(.et_pb_builder_is_used)', function() {
		$('#wp-content-wrap').hide();
	});	
	$(document).on('click', '[data-action="deactivate_builder"] .et_pb_prompt_proceed', function() {
		$('#wp-content-wrap').show();
	});
	<?php
	$is_builder_used = 'on' === get_post_meta( $post->ID, '_et_pb_use_builder', true ) ? true : false;
	if ($is_builder_used) {
	?>
	$('#wp-content-wrap').hide();
	<?php 
	} else {
	?>
	$('#wp-content-wrap').show();
	<?php
	}
	?>
});
</script>
<style>
#et_pb_layout { margin-top:20px; margin-bottom:0px }
.et_pb_toggle_builder_wrapper { display:none; }
</style>
<?php
	}
}

Related Post: Adding PHP code to the Divi Theme

I've updated Divi Booster's "Enable Divi Builder on Custom Post Types" option mentioned above, so that as of v2.3.5, it will include this code and make the Divi Builder available on Lifter LMS course pages.

The result (once you click the "Use The Divi Builder" button), will be that you can edit the course's "Enrolled Student Description" using the Divi Builder, like so:

Note that it doesn't enable you to use Divi Builder on the "Non-Enrolled Student Description" box. I don't have a solution for this at the moment, but if you want to show the same Divi Builder generated course description to both enrolled and non-enrolled students, then you can leave this blank and the page layout you create for the Enrolled Student Description will be shown to both.

Hundreds of new features for Divi
in one easy-to-use plugin

12 Comments

  1. Dan,
    I bought your DIVI BOOSTER around Christmas the end of the year 2016 and just had to drop you a line to say – OMG,this has been SUCH A LIFESAVER!

    I'm using it on a WP site with the DIVI THEME (obviously) and the LIFTER LMS for all my online courses.

    I cannot tell you what a joy it has made creating the class courses and lessons. LIFTER is a little techy for those of us who aren't that WP/programmer/code-oriented and YOUR BOOSTER has just made creating things the way I want them such a breeze.

    I added 15 courses just today and smiled all the way through. THANK YOU – THANK YOU – THANK YOU!

    Words cannot express how much easier my work is using the divi booster to let me create the pages I need in LIFTER. Those guys should be paying you! I found LIFTER a bit intimidating trying to get my courses and lessons the way I wanted, but with the divi booster – voila – easy as pie!

    THANKS AGAIN, EVER SO MUCH!
    Mandy

    Reply
    • You're very welcome, Mandy! I'm really glad it helped 🙂

      Reply
  2. Does it work for memberships too?

    Reply
    • Hi Laura, not at the moment, unfortunately. I'll try to come up with a way to do this, and will update this post if I'm able to.

      Reply
  3. I am a real newbie at website building. I want to add a course area to my website and I have Divi theme with the builder. Would you be able to tell me…very simply…if I can use the LifterLMS without any extra codes needed? and do you recommend just adding pages with the courses or would it be better if I got another related domain just for my courses?

    Reply
    • Hi Kate,

      No, just installing Divi and LifterLMS won't allow you to use the Divi Builder to edit your LifterLMS courses / lessons.

      But, if you also install my Divi Booster plugin and enable the appropriate setting, then yes you will be able to use Divi Builder on your LifterLMS course and lesson pages. The setting you need is found at "Divi Builder > Standard Builder > Enable Divi Builder on Custom Post Types" on the Divi Booster settings page.

      You can get Divi Booster here:

      https://divibooster.com/divi-booster-the-easy-way-to-customize-divi/

      If you choose not to use Divi Booster, then you will need to add extra code to get it to work. The code in the post above and in the linked post should do what you need. It is the same code Divi Booster uses – Divi Booster is just a convenient (but paid) way to add it.

      Reply
      • Oh, and regarding the use of pages vs a separate domain for your courses. Both will work and there's no real right or wrong – it just depends on your goals. Using pages is simpler as you only have one site to maintain, and may also benefit by letting you use plugins / content / images, etc, from your main site within your courses (should you ever need to). Using a separate domain mainly offers some security benefits as you keep your course users isolated from your main site, etc. It's not particularly common for people to implement this level of separation, but it's something to consider. A separate domain also makes it easier to have a different style for your courses vs your main site. Hope that helps!

        Reply
  4. Hi,

    I would like to ask as I have Divi theme and also Divi booster, do i have to install Divi builder as well into the wordpress to enable working with custom post types. Currently Divi theme to work is not necessary to have divi builder installed separately.

    thanks in advance

    Reply
    • Hi Lu, it won't be necessary to install Divi Builder plugin. Divi Booster uses the Divi Builder functionality already included in the Divi theme to enable the Divi Builder on custom post types. So with the Divi Theme and Divi Booster both installed, all you need to do to get the Divi Builder working on custom post types is to enable this Divi Booster option: "Divi Builder > Standard Builder > Enable Divi Builder on Custom Post Types".

      Reply
  5. I have divibooster, how do I add the divi builder to the actual lesson page editor? I couldn't find anything for that.

    Reply
    • Hi Merav, the option you need can be found on the Divi Booster settings page, under "Divi Builder > Standard Builder > Enable Divi Builder on Custom Post Types".

      Tick that option, save the Divi Booster settings and then reload your lesson page editor. You should then seen the purple "Use the Divi Builder" button, which you can use to activate the Divi Builder.

      Reply
  6. This is great! Thank you for sharing!

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *