Make WordPress Themes

source: lightning/4.1.4/index.php

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

New version of Lightning - 4.1.4

File size: 2.9 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<div class="col-md-8 mainSection" id="main" role="main">
11
12 <?php
13/*-------------------------------------------*/
14/*  Archive title
15/*-------------------------------------------*/
16$page_for_posts = lightning_get_page_for_posts();
17// Use post top page( Archive title wrap to div )
18if ( $page_for_posts['post_top_use'] || get_post_type() != 'post' ) {
19  if ( is_year() || is_month() || is_day() || is_tag() || is_author() || is_tax() || is_category() ) {
20      $archiveTitle = get_the_archive_title();
21      $archiveTitle_html = '<header class="archive-header"><h1>'. $archiveTitle .'</h1></header>';
22      echo apply_filters( 'lightning_mainSection_archiveTitle' , $archiveTitle_html );
23  }
24}
25
26/*-------------------------------------------*/
27/*  Archive description
28/*-------------------------------------------*/
29  if ( is_category() || is_tax() || is_tag() ) {
30    $category_description = term_description();
31    $page = get_query_var( 'paged', 0 );
32    if ( ! empty( $category_description ) && $page == 0 ) {
33      $archiveDescription_html = '<div class="archive-meta">' . $category_description . '</div>';
34      echo apply_filters( 'lightning_mainSection_archiveDescription' , $archiveDescription_html );
35    }
36  }
37
38$postType = lightning_get_post_type();
39
40do_action('lightning_loop_before'); ?>
41
42<div class="postList">
43
44<?php if (have_posts()) : ?>
45
46  <?php if( apply_filters( 'is_lightning_extend_loop' , false ) ): ?>
47
48    <?php do_action( 'lightning_extend_loop' ); ?>
49
50  <?php elseif (file_exists(get_stylesheet_directory( ).'/module_loop_'.$postType['slug'].'.php') && $postType != 'post' ): ?>
51
52    <?php while ( have_posts() ) : the_post(); ?>
53    <?php get_template_part('module_loop_'.$postType['slug']); ?>
54    <?php endwhile; ?>
55
56  <?php else: ?>
57
58    <?php while ( have_posts() ) : the_post();?>
59    <?php get_template_part('module_loop_post'); ?>
60    <?php endwhile;?>
61
62  <?php endif; // loop() ?>
63
64  <?php
65  the_posts_pagination(array (
66                          'mid_size'  => 1,
67                          'prev_text' => '&laquo;',
68                          'next_text' => '&raquo;',
69                          'type'      => 'list',
70                          'before_page_number' => '<span class="meta-nav screen-reader-text">' . __ ( 'Page', 'lightning' ) . ' </span>'
71                      ) );
72  ?>
73
74  <?php else: // hove_posts() ?>
75
76  <div class="well"><p><?php _e('No posts.','lightning');?></p></div>
77
78<?php endif; // have_post() ?>
79
80</div><!-- [ /.postList ] -->
81
82<?php do_action('lightning_loop_after'); ?>
83
84</div><!-- [ /.mainSection ] -->
85
86<div class="col-md-3 col-md-offset-1 subSection sideSection">
87<?php get_sidebar(get_post_type()); ?>
88</div><!-- [ /.subSection ] -->
89
90</div><!-- [ /.row ] -->
91</div><!-- [ /.container ] -->
92</div><!-- [ /.siteContent ] -->
93 <?php get_footer(); ?>
Note: See TracBrowser for help on using the repository browser.