Make WordPress Themes

source: lightning/4.1.4/sidebar-page.php

Last change on this file was 87921, checked in by themedropbox, 8 years ago

New version of Lightning - 4.1.4

File size: 1.0 KB
Line 
1<?php
2if ( is_active_sidebar( 'common-side-top-widget-area' ) )
3  dynamic_sidebar( 'common-side-top-widget-area' );
4
5// Display post type widget area
6$widdget_area_name = 'page-side-widget-area';
7if ( is_active_sidebar( $widdget_area_name ) ){
8  dynamic_sidebar( $widdget_area_name );
9} else {
10
11        if($post->ancestors){
12                foreach($post->ancestors as $post_anc_id){
13                        $post_id = $post_anc_id;
14                } // foreach($post->ancestors as $post_anc_id){
15        } else {
16                $post_id = $post->ID;
17        } // if($post->ancestors){
18
19        if ($post_id) {
20                $children = wp_list_pages("title_li=&child_of=".$post_id."&echo=0");
21                if ($children) { ?>
22                        <aside class="widget widget_child_page widget_link_list">
23                        <nav class="localNav">
24                        <h1 class="subSection-title"><?php echo get_the_title($post_id); ?></h1>
25                        <ul>
26                        <?php echo $children; ?>
27                        </ul>
28                        </nav>
29                        </aside>
30                <?php } // if ($children)
31        } // if ($post_id)
32
33} // if ( is_active_sidebar( $widdget_area_name ) ){
34
35if ( is_active_sidebar( 'common-side-bottom-widget-area' ) )
36  dynamic_sidebar( 'common-side-bottom-widget-area' );
37?>
Note: See TracBrowser for help on using the repository browser.