forked from weblab/cornerstone
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding class for content area widgets
- Loading branch information
andrewmbacon
committed
Jun 1, 2015
1 parent
3db55d6
commit e19f0fa
Showing
7 changed files
with
88 additions
and
89 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,46 @@ | ||
<?php | ||
/** | ||
Template Name: Home | ||
* The template for displaying the homepage. | ||
* | ||
* @package cornerstone | ||
*/ | ||
$rows = get_theme_mod('homepagerows', '2'); | ||
$count = 1; | ||
get_header(); | ||
?> | ||
|
||
<div id="page-home"> | ||
<?php while ( have_posts() ) : the_post(); ?> | ||
<?php for($i=0; $i<$rows; $i++){ /* Begin Homepage Builder... */?> | ||
<div class="row"> | ||
<?php | ||
$widths = get_theme_mod('homepage_'.$i, '12'); | ||
$widths = explode(',',$widths); | ||
if(count($widths) == 1) $widths[0] = 12; | ||
foreach($widths as $width){ | ||
if($width == 0) break; | ||
?> | ||
<div class="col-sm-<?php echo $width; ?>"> | ||
<div class="home-section" id="home-section-<?php echo $count; ?>"> | ||
<?php if ( is_active_sidebar( 'home'.$count ) ) { | ||
dynamic_sidebar( 'home'.$count ); | ||
} elseif(isset( $wp_customize )) { | ||
?> | ||
<div class="widget widget-placeholder"> | ||
<h3>Home <?php echo $count; ?></h3> | ||
<p>This is a placeholder and will not be visible to the public. Add content to this section with the "Widgets" tool.</p> | ||
</div> | ||
<?php | ||
} else { | ||
|
||
}?> | ||
</div> | ||
</div> | ||
<?php $count ++; } ?> | ||
</div> | ||
<!-- /row--> | ||
<?php } /* ... end Homepage Builder */?> | ||
<?php endwhile; // end of the loop. ?> | ||
</div> | ||
<?php get_footer(); ?> | ||
<?php | ||
/** | ||
Template Name: Home | ||
* The template for displaying the homepage. | ||
* | ||
* @package cornerstone | ||
*/ | ||
$rows = get_theme_mod('homepagerows', '2'); | ||
$count = 1; | ||
get_header(); | ||
?> | ||
<div id="page-home"> | ||
<?php while ( have_posts() ) : the_post(); ?> | ||
<?php for($i=0; $i<$rows; $i++){ /* Begin Homepage Builder... */?> | ||
<div class="row"> | ||
<?php | ||
$widths = get_theme_mod('homepage_'.$i, '12'); | ||
$widths = explode(',',$widths); | ||
if(count($widths) == 1) $widths[0] = 12; | ||
foreach($widths as $width){ | ||
if($width == 0) break; | ||
?> | ||
<div class="col-sm-<?php echo $width; ?>"> | ||
<div class="home-section" id="home-section-<?php echo $count; ?>"> | ||
<?php if ( is_active_sidebar( 'home'.$count ) ) { | ||
dynamic_sidebar( 'home'.$count ); | ||
} elseif(isset( $wp_customize )) { | ||
?> | ||
<div class="widget widget-placeholder"> | ||
<h3>Home <?php echo $count; ?></h3> | ||
<p>This is a placeholder and will not be visible to the public. Add content to this section with the "Widgets" tool.</p> | ||
</div> | ||
<?php | ||
} else { | ||
|
||
}?> | ||
</div> | ||
</div> | ||
<?php $count ++; } ?> | ||
</div> | ||
<!-- /row--> | ||
<?php } /* ... end Homepage Builder */?> | ||
<?php endwhile; // end of the loop. ?> | ||
</div> | ||
<?php get_footer(); ?> |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
<?php | ||
/** | ||
* The template for displaying all pages. | ||
* | ||
* This is the template that displays all pages by default. | ||
* Please note that this is the WordPress construct of pages | ||
* and that other 'pages' on your WordPress site will use a | ||
* different template. | ||
* | ||
* @package cornerstone | ||
*/ | ||
|
||
get_header(); ?> | ||
<?php include('inc/sidebar-check.php')?> | ||
<div id="page-page"> | ||
<?php if (have_posts()) : while ( have_posts() ) : the_post(); ?> | ||
<?php include('inc/submenu-check.php') ?> | ||
<div class="row"> | ||
<div class="col-sm-<?php echo (is_active_sidebar( $sidebar )?9:12); ?>"> | ||
<div id="primary" class="content-area"> | ||
<main id="main" class="site-main" role="main"> | ||
<?php get_template_part( 'content', 'page' ); ?> | ||
<?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> | ||
</div> | ||
</div> | ||
<?php include('inc/sidebar-if-active.php')?> | ||
</div> | ||
<?php include('inc/submenu-closing-tags.php')?> | ||
<?php endwhile; endif; // end of the loop. ?> | ||
</div> | ||
<?php get_footer(); ?> | ||
<?php | ||
/** | ||
* The template for displaying all pages. | ||
* | ||
* This is the template that displays all pages by default. | ||
* Please note that this is the WordPress construct of pages | ||
* and that other 'pages' on your WordPress site will use a | ||
* different template. | ||
* | ||
* @package cornerstone | ||
*/ | ||
|
||
get_header(); ?> | ||
<?php include('inc/sidebar-check.php')?> | ||
<div id="page-page"> | ||
<?php if (have_posts()) : while ( have_posts() ) : the_post(); ?> | ||
<?php include('inc/submenu-check.php') ?> | ||
<div class="row"> | ||
<div class="col-sm-<?php echo (is_active_sidebar( $sidebar )?9:12); ?>"> | ||
<div id="primary" class="content-area subpage"> | ||
<main id="main" class="site-main" role="main"> | ||
<?php get_template_part( 'content', 'page' ); ?> | ||
<?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> | ||
</div> | ||
</div> | ||
<?php include('inc/sidebar-if-active.php')?> | ||
</div> | ||
<?php include('inc/submenu-closing-tags.php')?> | ||
<?php endwhile; endif; // end of the loop. ?> | ||
</div> | ||
<?php get_footer(); ?> |