Last active
November 10, 2017 18:31
-
-
Save generatepress/7f324df1ee32bf389cc2e476739875dd to your computer and use it in GitHub Desktop.
Add support for Lifter LMS plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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