Last active
November 23, 2017 06:52
-
-
Save dwainm/d24a82ddfec000afcd0112c87c55d71f to your computer and use it in GitHub Desktop.
Fame Themes OnePress Sensei Wrappers ( integration ) https://www.famethemes.com/themes/onepress
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
<?php // << make sure to remove this `<?php` if you're copying this into your functions.php | |
// | |
// Your code goes below | |
// | |
/** Sensei Integration **/ | |
add_action( 'after_setup_theme', 'declare_sensei_support' ); | |
function declare_sensei_support() { | |
add_theme_support( 'sensei' ); | |
} | |
remove_action( 'sensei_before_main_content', array( Sensei()->frontend, 'sensei_output_content_wrapper' ), 10 ); | |
remove_action( 'sensei_after_main_content', array( Sensei()->frontend, 'sensei_output_content_wrapper_end' ), 10 ); | |
add_action('sensei_before_main_content', 'my_theme_sensei_wrapper_start', 10); | |
add_action('sensei_after_main_content', 'my_theme_sensei_wrapper_end', 10); | |
function my_theme_sensei_wrapper_start() { | |
?> | |
<div id="content" class="site-content"> | |
<div class="page-header"> | |
<div class="container"> | |
<?php | |
if( is_singular( 'quiz' ) ) { | |
echo '<h1 class="entry-title">' . get_the_title() . ' ' . __( 'Quiz', 'woothemes-sensei' ) . '</h1>'; | |
} else { | |
the_title( '<h1 class="entry-title">', '</h1>' ); | |
} | |
?> | |
</div> | |
</div> | |
<?php echo onepress_breadcrumb(); ?> | |
<div id="content-inside" class="container right-sidebar"> | |
<div id="primary" class="content-area"> | |
<main id="main" class="site-main" role="main"> | |
<?php | |
} | |
function my_theme_sensei_wrapper_end() { | |
?> | |
</main><!-- #main --> | |
</div><!-- #primary --> | |
<?php if ( $layout != 'no-sidebar' ) { ?> | |
<?php get_sidebar(); ?> | |
<?php } ?> | |
</div><!--#content-inside --> | |
</div><!-- #content --> | |
<?php | |
} | |
/** /Sensei Integration **/ |
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
article.course header h1, | |
article.lesson header h1, | |
article.quiz header h1 | |
{ | |
display: none; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment