This repository has been archived by the owner. It is now read-only.
Permalink
Cannot retrieve contributors at this time
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?
cornerstone/page-home.php
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
40 lines (39 sloc)
1.16 KB
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 | |
/** | |
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(); ?> |