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