1<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
2
3 <h2><?php the_title(); ?></h2>
4 <?php the_content(); ?>
5
6 <?php endwhile; else: ?>
7
8 <h2><?php esc_html_e( '404 Error', 'phpforwp' ); ?></h2>
9 <p><?php esc_html_e( 'Sorry, content not found.', 'phpforwp' ); ?></p>
10
11<?php endif; ?>
12
1<!------- WordPress Basic Loop ------->
2
3<?php if ( have_posts() ) : ?>
4 <?php while ( have_posts() ) : the_post(); ?>
5
6 <?php the_title();?>
7 <?php the_content();?>
8
9 <?php endwhile; ?>
10<?php endif; ?>
1<div class="col-lg-12">
2 <div class="row">
3
4 <?php if ( have_posts() ) : ?>
5 <?php if ( in_category( 'Featured' ) ) : /* Start the Featured Loop */ ?>
6
7 <?php while( have_posts() ) : the_post(); ?>
8
9 <?php if( $wp_query->current_post == 0 ) {
10 //open wide column wrapper div// ?>
11 <?php } ?>
12
13 <?php if( $wp_query->current_post <= 1 ) {
14 get_template_part( 'content', 'featured' );
15 //insert large post// ?>
16 <?php } ?>
17
18 <?php if( $wp_query->current_post == 1 || $wp_query->current_post <= 1 && $wp_query->current_post == $wp_query->post_count-1 ) {
19 //close wide column div// ?>
20 <?php } ?>
21
22 <?php if( $wp_query->current_post == 2 || $wp_query->current_post <= 1 && $wp_query->current_post == $wp_query->post_count-1 ) {
23 //open narrow column wrapper div// ?>
24 <?php } ?>
25
26 <?php if( $wp_query->current_post >= 2 ) {
27 get_template_part( 'content', 'featuredside' );
28 //insert small post//?>
29 <?php } ?>
30
31 <?php if( $wp_query->current_post == 4 || $wp_query->current_post == $wp_query->post_count-1 ) {
32 //close narrow column div// ?>
33 <?php } ?>
34
35 <?php endwhile; ?>
36
37 <?php endif; ?>
38
39 <?php endif; ?>
40
41 </div> <!--/.row-->
42</div> <!--/.col-lg-12-->