Skip to content

Instantly share code, notes, and snippets.

@ewels
Created August 27, 2014 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ewels/cb1e292017e9152f78ea to your computer and use it in GitHub Desktop.
Save ewels/cb1e292017e9152f78ea to your computer and use it in GitHub Desktop.
Child front-page.php for a full width carousel using the Unite wordpress theme: https://github.com/puikinsh/Unite-Theme
<?php
if ( get_option( 'show_on_front' ) == 'posts' ) {
get_template_part( 'index' );
} elseif ( 'page' == get_option( 'show_on_front' ) ) {
get_header();
while ( have_posts() ) : the_post();
the_content(); ?>
<div id="primary" class="content-area col-sm-12 col-md-12">
<main id="main" class="site-main" role="main">
<div class="home-widget-area row">
<div class="col-sm-6 col-md-4 home-widget">
<?php if( is_active_sidebar('home1') ) dynamic_sidebar( 'home1' ); ?>
</div>
<div class="col-sm-6 col-md-4 home-widget">
<?php if( is_active_sidebar('home2') ) dynamic_sidebar( 'home2' ); ?>
</div>
<div class="col-sm-6 col-md-4 home-widget">
<?php if( is_active_sidebar('home3') ) dynamic_sidebar( 'home3' ); ?>
</div>
</div>
<?php
// If comments are open or we have at least one comment, load up the comment template
if ( comments_open() || '0' != get_comments_number() ) :
comments_template();
endif;
?>
</main><!-- #main -->
</div><!-- #primary -->
<?php
endwhile; // end of the loop.
get_footer();
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment