Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
1c92807c95
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
40 lines (39 sloc) 1.16 KB
<?php
/**
Template Name: Home
* 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
*/
$rows = get_theme_mod('homepagerows');
$count = 1;
get_header(); ?>
<?php for($i=0; $i<$rows; $i++){ ?>
<div class="row">
<?php //for($j=0;$j<12;$j++){
$widths = get_theme_mod('homepage_'.$i);
$widths = explode(',',$widths);
foreach($widths as $width){
if($width == 0) break;
?>
<div class="col-md-<?php echo $width; ?>">
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php if ( is_active_sidebar( 'home'.$count ) ) { ?>
<?php dynamic_sidebar( 'home'.$count ); ?>
<?php } else { ?>
<h1>Home<?php echo $count; ?></h1>
<p>Go to Appearance > Customize, scroll down and open the Home<?php echo $count; ?> section to edit this area.</p>
<?php }; ?>
</main><!-- #main -->
</div><!-- #primary -->
</div>
<?php $count ++; } ?>
</div>
<?php } ?>
<?php get_footer(); ?>