| Line | |
|---|
| 1 | <?php |
|---|
| 2 | get_header(); ?> |
|---|
| 3 | |
|---|
| 4 | <section id="blog" class="blog-lists <?php echo esc_attr( bizberg_sidebar_position() ); ?>"> |
|---|
| 5 | |
|---|
| 6 | <div class="container"> |
|---|
| 7 | |
|---|
| 8 | <div class="row"> |
|---|
| 9 | |
|---|
| 10 | <div class="col-sm-9"> |
|---|
| 11 | |
|---|
| 12 | <?php |
|---|
| 13 | if ( have_posts() ) : |
|---|
| 14 | |
|---|
| 15 | if ( is_home() && ! is_front_page() ) : ?> |
|---|
| 16 | <header> |
|---|
| 17 | <h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1> |
|---|
| 18 | </header> |
|---|
| 19 | |
|---|
| 20 | <?php |
|---|
| 21 | endif; |
|---|
| 22 | |
|---|
| 23 | /* Start the Loop */ |
|---|
| 24 | echo '<div class="row">'; |
|---|
| 25 | while ( have_posts() ) : the_post(); |
|---|
| 26 | |
|---|
| 27 | if( bizberg_sidebar_position() != 'blog-nosidebar-1' ){ |
|---|
| 28 | get_template_part( 'template-parts/content', get_post_format() ); |
|---|
| 29 | } else { |
|---|
| 30 | get_template_part( 'template-parts/content', 'nosidebar' ); |
|---|
| 31 | } |
|---|
| 32 | |
|---|
| 33 | endwhile; |
|---|
| 34 | echo '</div>'; |
|---|
| 35 | |
|---|
| 36 | bizberg_numbered_pagination(); |
|---|
| 37 | |
|---|
| 38 | else : |
|---|
| 39 | |
|---|
| 40 | get_template_part( 'template-parts/content', 'none' ); |
|---|
| 41 | |
|---|
| 42 | endif; ?> |
|---|
| 43 | |
|---|
| 44 | </div> |
|---|
| 45 | |
|---|
| 46 | <?php |
|---|
| 47 | |
|---|
| 48 | /** |
|---|
| 49 | * Disable sidebar in grid view |
|---|
| 50 | */ |
|---|
| 51 | |
|---|
| 52 | if( bizberg_sidebar_position() != 'blog-nosidebar-1' ){ ?> |
|---|
| 53 | <div class="col-sm-3"> |
|---|
| 54 | <?php get_sidebar(); ?> |
|---|
| 55 | </div> |
|---|
| 56 | <?php |
|---|
| 57 | } ?> |
|---|
| 58 | |
|---|
| 59 | </div> |
|---|
| 60 | |
|---|
| 61 | </div> |
|---|
| 62 | |
|---|
| 63 | </section> |
|---|
| 64 | |
|---|
| 65 | <?php |
|---|
| 66 | get_footer(); |
|---|
Note: See
TracBrowser
for help on using the repository browser.