Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Modify page-home.php to display empty widget areas when in theme cust…
Browse files Browse the repository at this point in the history
…omizer
  • Loading branch information
jmr06005 committed Feb 17, 2015
1 parent e0273d3 commit 0ce94ef
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions page-home.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
*/
$rows = get_theme_mod('homepagerows', '2');
$count = 1;
get_header(); ?>
get_header();
?>

<div id="page-home">
<?php while ( have_posts() ) : the_post(); ?>
Expand All @@ -23,10 +24,18 @@
?>
<div class="col-sm-<?php echo $width; ?>">
<div class="home-section" id="home-section-<?php echo $count; ?>">
<?php if ( is_active_sidebar( 'home'.$count ) ) { ?>
<?php dynamic_sidebar( 'home'.$count ); ?>
<?php } else { ?>
<?php }; ?>
<?php if ( is_active_sidebar( 'home'.$count ) ) {
dynamic_sidebar( 'home'.$count );
} elseif(isset( $wp_customize )) {
?>
<div class="widget">
<h3>Home <?php echo $count; ?></h3>
We're in the customizer, this widget area is empty.
</div>
<?php
} else {

}?>
</div>
</div>
<?php $count ++; } ?>
Expand Down

0 comments on commit 0ce94ef

Please sign in to comment.