| 1 | <?php get_header(); ?> |
|---|
| 2 | |
|---|
| 3 | <?php get_template_part( 'module_slide' ); ?> |
|---|
| 4 | |
|---|
| 5 | <div class="section siteContent"> |
|---|
| 6 | <div class="container"> |
|---|
| 7 | <div class="row"> |
|---|
| 8 | |
|---|
| 9 | <?php |
|---|
| 10 | global $lightning_theme_options; |
|---|
| 11 | $lightning_theme_options = get_option( 'lightning_theme_options' ); |
|---|
| 12 | if ( |
|---|
| 13 | isset( $lightning_theme_options['top_sidebar_hidden'] ) && |
|---|
| 14 | $lightning_theme_options['top_sidebar_hidden'] ) { |
|---|
| 15 | $main_col = 'col-md-12'; |
|---|
| 16 | } else { |
|---|
| 17 | $main_col = 'col-md-8'; |
|---|
| 18 | } |
|---|
| 19 | ?> |
|---|
| 20 | |
|---|
| 21 | <div class="<?php echo $main_col; ?> mainSection"> |
|---|
| 22 | |
|---|
| 23 | <?php do_action( 'lightning_home_content_top_widget_area_before' ); ?> |
|---|
| 24 | |
|---|
| 25 | <?php if ( is_active_sidebar( 'home-content-top-widget-area' ) ) : ?> |
|---|
| 26 | <?php dynamic_sidebar( 'home-content-top-widget-area' ); ?> |
|---|
| 27 | <?php endif; ?> |
|---|
| 28 | |
|---|
| 29 | <?php do_action( 'lightning_home_content_top_widget_area_after' ); ?> |
|---|
| 30 | |
|---|
| 31 | <?php if ( apply_filters( 'is_lightning_home_content_display', true ) ) : ?> |
|---|
| 32 | |
|---|
| 33 | <?php if ( have_posts() ) : ?> |
|---|
| 34 | |
|---|
| 35 | <?php if ( 'page' == get_option( 'show_on_front' ) ) : ?> |
|---|
| 36 | |
|---|
| 37 | <?php |
|---|
| 38 | while ( have_posts() ) : |
|---|
| 39 | the_post(); |
|---|
| 40 | ?> |
|---|
| 41 | |
|---|
| 42 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
|---|
| 43 | <div class="entry-body"> |
|---|
| 44 | <?php the_content(); ?> |
|---|
| 45 | </div> |
|---|
| 46 | <?php |
|---|
| 47 | wp_link_pages( |
|---|
| 48 | array( |
|---|
| 49 | 'before' => '<div class="page-link">' . 'Pages:', |
|---|
| 50 | 'after' => '</div>', |
|---|
| 51 | ) |
|---|
| 52 | ); |
|---|
| 53 | ?> |
|---|
| 54 | </article><!-- [ /#post-<?php the_ID(); ?> ] --> |
|---|
| 55 | |
|---|
| 56 | <?php endwhile; ?> |
|---|
| 57 | |
|---|
| 58 | <?php else : ?> |
|---|
| 59 | |
|---|
| 60 | <div class="postList"> |
|---|
| 61 | |
|---|
| 62 | <?php |
|---|
| 63 | while ( have_posts() ) : |
|---|
| 64 | the_post(); |
|---|
| 65 | ?> |
|---|
| 66 | |
|---|
| 67 | <?php get_template_part( 'module_loop_post' ); ?> |
|---|
| 68 | |
|---|
| 69 | <?php endwhile; ?> |
|---|
| 70 | |
|---|
| 71 | <?php |
|---|
| 72 | the_posts_pagination( |
|---|
| 73 | array( |
|---|
| 74 | 'mid_size' => 1, |
|---|
| 75 | 'prev_text' => '«', |
|---|
| 76 | 'next_text' => '»', |
|---|
| 77 | 'type' => 'list', |
|---|
| 78 | 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'lightning' ) . ' </span>', |
|---|
| 79 | ) |
|---|
| 80 | ); |
|---|
| 81 | ?> |
|---|
| 82 | |
|---|
| 83 | </div><!-- [ /.postList ] --> |
|---|
| 84 | |
|---|
| 85 | <?php endif; // if ( 'page' == get_option('show_on_front') ) : ?> |
|---|
| 86 | |
|---|
| 87 | <?php else : ?> |
|---|
| 88 | |
|---|
| 89 | <div class="well"><p><?php _e( 'No posts.', 'lightning' ); ?></p></div> |
|---|
| 90 | |
|---|
| 91 | <?php endif; // have_post() ?> |
|---|
| 92 | |
|---|
| 93 | <?php endif; // if ( apply_filters( 'is_lightning_home_top_posts_display', true ) ) : ?> |
|---|
| 94 | |
|---|
| 95 | </div><!-- [ /.mainSection ] --> |
|---|
| 96 | |
|---|
| 97 | <?php if ( ! isset( $lightning_theme_options['top_sidebar_hidden'] ) || ! $lightning_theme_options['top_sidebar_hidden'] ) : ?> |
|---|
| 98 | |
|---|
| 99 | <div class="col-md-3 col-md-offset-1 subSection sideSection"> |
|---|
| 100 | <?php get_sidebar(); ?> |
|---|
| 101 | </div><!-- [ /.subSection ] --> |
|---|
| 102 | |
|---|
| 103 | <?php endif; ?> |
|---|
| 104 | |
|---|
| 105 | </div><!-- [ /.row ] --> |
|---|
| 106 | </div><!-- [ /.container ] --> |
|---|
| 107 | </div><!-- [ /.siteContent ] --> |
|---|
| 108 | <?php get_footer(); ?> |
|---|