Skip to content

Commit

Permalink
Page menu updates
Browse files Browse the repository at this point in the history
  • Loading branch information
voblak2 committed Jul 26, 2020
1 parent 3dcd509 commit 5164079
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions page.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,33 @@
<?php }
?>

<?php
$testArray = get_pages(array(
'child_of' => get_the_ID()
));

if ($theParent or $testArray) { ?>

<div class="page-links">
<h2 class="page-links__title"><a href="#">About Us</a></h2>
<h2 class="page-links__title"><a href="<?php echo get_the_permalink($theParent); ?>"><?php echo get_the_title($theParent); ?></a></h2>
<ul class="min-list">
<?php
wp_list_pages();

if ($theParent) {
$findChildrenOf = $theParent;
} else {
$findChildrenOf = get_the_ID();
}

wp_list_pages(array(
'title_li' => NULL,
'child_of' => $findChildrenOf,
'sort_column' => 'menu_order'
));
?>
</ul>
</div>
</div>
<?php } ?>

<div class="generic-content">
<?php the_content(); ?>
Expand Down

0 comments on commit 5164079

Please sign in to comment.