Make WordPress Themes

source: lightning/0.1.13/page.php

Last change on this file was 52403, checked in by themedropbox, 10 years ago

New version of Lightning - 0.1.13

File size: 2.0 KB
Line 
1<?php get_header(); ?>
2
3<?php get_template_part('module_pageTit'); ?>
4<?php get_template_part('module_panList'); ?>
5
6<div class="section siteContent">
7<div class="container">
8<div class="row">
9
10<main class="col-md-8 mainSection" id="main" role="main">
11
12    <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
13
14    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
15    <div class="entry-body">
16    <?php the_content(); ?>
17    </div>
18        <?php
19        $args = array(
20                'before'           => '<nav class="page-link"><dl><dt>Pages :</dt><dd>',
21                'after'            => '</dd></dl></nav>',
22                'link_before'      => '<span class="page-numbers">',
23                'link_after'       => '</span>',
24                'echo'             => 1 );
25        wp_link_pages( $args ); ?>
26    </div><!-- [ /#post-<?php the_ID(); ?> ] -->
27
28        <?php endwhile; ?>
29
30</main><!-- [ /.mainSection ] -->
31
32<div class="col-md-3 col-md-offset-1 subSection">
33<?php
34if ( is_active_sidebar( 'common-side-top-widget-area' ) )
35  dynamic_sidebar( 'common-side-top-widget-area' );
36
37// Display post type widget area
38$widdget_area_name = 'page-side-widget-area';
39if ( is_active_sidebar( $widdget_area_name ) ){
40  dynamic_sidebar( $widdget_area_name );
41} else {
42
43        if($post->ancestors){
44                foreach($post->ancestors as $post_anc_id){
45                        $post_id = $post_anc_id;
46                } // foreach($post->ancestors as $post_anc_id){
47        } else {
48                $post_id = $post->ID;
49        } // if($post->ancestors){
50
51        if ($post_id) {
52                $children = wp_list_pages("title_li=&child_of=".$post_id."&echo=0");
53                if ($children) { ?>
54                        <aside class="widget widget_archive">
55                        <nav class="localNav">
56                        <h1 class="subSection-title"><?php echo get_the_title($post_id); ?></h1>
57                        <ul>
58                        <?php echo $children; ?>
59                        </ul>
60                        </nav>
61                        </aside>
62                <?php } // if ($children)
63        } // if ($post_id)
64
65} // if ( is_active_sidebar( $widdget_area_name ) ){
66
67if ( is_active_sidebar( 'common-side-bottom-widget-area' ) )
68  dynamic_sidebar( 'common-side-bottom-widget-area' );
69?>
70</div><!-- [ /.subSection ] -->
71
72</div><!-- [ /.row ] -->
73</div><!-- [ /.container ] -->
74</div><!-- [ /.siteContent ] -->
75<?php get_footer(); ?>
Note: See TracBrowser for help on using the repository browser.