Make WordPress Themes

source: lightning/12.2.1/front-page.php

Last change on this file was 136250, checked in by themedropbox, 5 years ago

New version of Lightning - 12.2.1

File size: 4.3 KB
Line 
1<?php get_header(); ?>
2
3<?php
4do_action( 'lightning_top_slide_before' );
5if ( empty( $lightning_theme_options['top_slide_hide'] ) ) {
6        if ( $bootstrap == '3' ) {
7                $old_file_name[] = 'module_slide.php';
8                if ( locate_template( $old_file_name, false, false ) ) {
9                        locate_template( $old_file_name, true, false );
10                } else {
11                        get_template_part( 'template-parts/slide', 'bs3' );
12                }
13        } else {
14                get_template_part( 'template-parts/slide', 'bs4' );
15        }
16}
17do_action( 'lightning_top_slide_after');
18?>
19
20<div class="<?php lightning_the_class_name( 'siteContent' ); ?>">
21<?php do_action( 'lightning_siteContent_prepend' ); ?>
22<div class="container">
23<?php do_action( 'lightning_siteContent_container_prepend' ); ?>
24<div class="row">
25
26                        <div class="<?php lightning_the_class_name( 'mainSection' ); ?>">
27
28                        <?php do_action( 'lightning_home_content_top_widget_area_before' ); ?>
29
30                        <?php if ( is_active_sidebar( 'home-content-top-widget-area' ) ) : ?>
31                                <?php dynamic_sidebar( 'home-content-top-widget-area' ); ?>
32                        <?php endif; ?>
33
34                        <?php do_action( 'lightning_home_content_top_widget_area_after' ); ?>
35
36                        <?php if ( apply_filters( 'is_lightning_home_content_display', true ) ) : ?>
37
38                                <?php if ( have_posts() ) : ?>
39
40                                        <?php if ( 'page' == get_option( 'show_on_front' ) ) : ?>
41
42                                                <?php
43                                                while ( have_posts() ) :
44                                                        the_post();
45                                                        ?>
46
47                                                <article id="post-<?php the_ID(); ?>" <?php post_class( apply_filters( 'lightning_article_outer_class', '' ) ); ?>>
48                                                <?php do_action( 'lightning_entry_body_before' ); ?>
49                                                <div class="<?php lightning_the_class_name( 'entry-body' ); ?>">
50                                                        <?php the_content(); ?>
51                                                </div>
52                                                <?php do_action( 'lightning_entry_body_after' ); ?>
53                                                        <?php
54                                                        wp_link_pages(
55                                                                array(
56                                                                        'before' => '<div class="page-link">' . 'Pages:',
57                                                                        'after'  => '</div>',
58                                                                )
59                                                        );
60                                                        ?>
61                                                 </article><!-- [ /#post-<?php the_ID(); ?> ] -->
62
63                                        <?php endwhile; ?>
64
65                                <?php else : ?>
66
67                                        <div class="<?php lightning_the_class_name( 'postList' ); ?>">
68
69                                        <?php if ( apply_filters( 'is_lightning_extend_loop', false ) ) : ?>
70
71                                                <?php do_action( 'lightning_extend_loop' ); ?>
72
73                                        <?php else : ?>
74
75                                                <?php
76                                                /**
77                                                 * Dealing with old files
78                                                 * Actually, it's ok to only use get_template_part().
79                                                 * It is measure for before version 7.0 that loaded module_loop_***.php.
80                                                 */
81                                                $postType = lightning_get_post_type();
82                                                $old_file_name[] = 'module_loop_' . $postType['slug'] . '.php';
83                                                $old_file_name[] = 'module_loop_post.php';
84                                                $require_once    = false;
85
86                                                global $lightning_loop_item_count;
87                                                $lightning_loop_item_count = 0;
88
89                                                while ( have_posts() ) :
90                                                        the_post();
91
92                                                        if ( locate_template( $old_file_name, false, $require_once ) ) {
93                                                                locate_template( $old_file_name, true, $require_once );
94                                                        } else {
95                                                                get_template_part( 'template-parts/post/loop', $postType['slug'] );
96                                                        }
97
98                                                        $lightning_loop_item_count++;
99                                                        do_action( 'lightning_loop_item_after' );
100
101                                                endwhile;
102                                        endif; ?>
103
104                                        <?php
105                                                the_posts_pagination(
106                                                        array(
107                                                                'mid_size'           => 1,
108                                                                'prev_text'          => '&laquo;',
109                                                                'next_text'          => '&raquo;',
110                                                                'type'               => 'list',
111                                                                'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'lightning' ) . ' </span>',
112                                                        )
113                                                );
114                                                ?>
115
116                                        </div><!-- [ /.postList ] -->
117
118                                <?php endif; // if ( 'page' == get_option('show_on_front') ) : ?>
119
120                        <?php else : ?>
121
122                                <div class="well"><p><?php _e( 'No posts.', 'lightning' ); ?></p></div>
123
124                        <?php endif; // have_post() ?>
125
126                        <?php endif; // if ( apply_filters( 'is_lightning_home_top_posts_display', true ) ) : ?>
127
128                        <?php do_action( 'lightning_mainSection_append' ); ?>
129                        </div><!-- [ /.mainSection ] -->
130
131                        <?php if ( lightning_is_subsection_display() ) : ?>
132                                <div class="<?php lightning_the_class_name( 'sideSection' ); ?>">
133                                        <?php get_sidebar(); ?>
134                                </div><!-- [ /.subSection ] -->
135                        <?php endif; ?>
136
137<?php do_action( 'lightning_additional_section' ); ?>
138
139</div><!-- [ /.row ] -->
140<?php do_action( 'lightning_siteContent_container_apepend' ); ?>
141</div><!-- [ /.container ] -->
142<?php do_action( 'lightning_siteContent_apepend' ); ?>
143</div><!-- [ /.siteContent ] -->
144<?php get_footer(); ?>
Note: See TracBrowser for help on using the repository browser.