Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save actual-saurabh/6e3192ca80dcf886c3860b33aac7c572 to your computer and use it in GitHub Desktop.

Select an option

Save actual-saurabh/6e3192ca80dcf886c3860b33aac7c572 to your computer and use it in GitHub Desktop.
Temporary Fix for Lesson compatibility with Elementor Templates
<?php // Do not copy this line
// Copy from under this line and paste into your child theme's functions.php
// only a temporary measure, remove once https://github.com/pojome/elementor/issues/5900 is resolved
add_filter( 'lifterlms_register_post_type_lesson' , 'llms_lesson_elementor_template_compatibility' );
function llms_lesson_elementor_template_compatibility( $lesson_post_type_params ) {
/*
* see https://github.com/gocodebox/lifterlms/blob/master/includes/class.llms.post-types.php#L223
* https://github.com/gocodebox/lifterlms/blob/master/includes/class.llms.post-types.php#L308-L342
*/
$lesson_post_type_params[ 'show_in_nav_menus' ] = true;
return $lesson_post_type_params;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment