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

Commit

Permalink
Browse files Browse the repository at this point in the history
Bugfix
  • Loading branch information
jmr06005 committed Dec 9, 2014
1 parent e3bd42a commit 0ec3909
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion inc/submenu-check.php
Expand Up @@ -12,7 +12,7 @@ if ( ( $locations = get_nav_menu_locations() ) && isset( $locations[ $menu_name
if($menu_item->object_id == get_the_ID()) $current_id = $menu_item->ID;
}
foreach($menu_items as $key => $menu_item) {
while($menu_item->menu_item_parent != array_pop($stack)) {
while(in_array($menu_item->menu_item_parent, $stack) && $menu_item->menu_item_parent != array_pop($stack)) {
$level--;
}
$level++;
Expand Down
74 changes: 37 additions & 37 deletions page.php
@@ -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 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; // 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">
<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(); ?>

0 comments on commit 0ec3909

Please sign in to comment.