Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add support for Lifter LMS plugin
if ( ! function_exists( 'generate_lifterlms_start' ) ) :
/**
* Add LifterLMS starting wrappers
*/
add_action('lifterlms_before_main_content', 'generate_lifterlms_start', 10);
function generate_lifterlms_start()
{ ?>
<div id="primary" <?php generate_content_class();?>>
<main id="main" <?php generate_main_class(); ?>>
<?php do_action('generate_before_main_content'); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> <?php generate_article_schema( 'CreativeWork' ); ?>>
<div class="inside-article">
<?php do_action( 'generate_before_content'); ?>
<div class="entry-content" itemprop="text">
<?php }
endif;
if ( ! function_exists( 'generate_lifterlms_end' ) ) :
/**
* Add Lifter LMS ending wrappers
*/
add_action('lifterlms_after_main_content', 'generate_lifterlms_end', 10);
function generate_lifterlms_end()
{
?>
</div><!-- .entry-content -->
<?php do_action( 'generate_after_content'); ?>
</div><!-- .inside-article -->
</article><!-- #post-## -->
<?php do_action('generate_after_main_content'); ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php
}
endif;
function tu_llms_theme_support(){
add_theme_support( 'lifterlms-sidebars' );
}
add_action( 'after_setup_theme', 'tu_llms_theme_support' );
function tu_llms_sidebar_function( $id ) {
$my_sidebar_id = 'sidebar-1';
return $my_sidebar_id;
}
add_filter( 'llms_get_theme_default_sidebar', 'tu_llms_sidebar_function' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.