Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php query_posts('cat=2 && showposts=3');
- if (have_posts()) : while (have_posts()) : the_post(); ?>
- <div class="col-xs-12 col-sm-4">
- <div class="column">
- <div class="news-article">
- <p class="news-date"><?php the_time( get_option( 'date_format' ) ); ?></p>
- <a href="<?php the_permalink(); ?>">
- <?php if ( has_post_thumbnail() ) { the_post_thumbnail('full', array( 'class' => 'img-responsive img-rounded news-img' )); } ?>
- <p class="news-headline"><?php the_title(); ?></p>
- </a>
- <p><?php the_excerpt(); ?></p>
- <a href="<?php the_permalink(); ?>">
- <p class="pull-right">Read more...</p>
- </a>
- <span class="clearfix"></span>
- </div>
- </div>
- </div>
- <?php
- endwhile;
- endif;
- ?>
- <?php
- $count = 0;
- query_posts('cat=2 && showposts=3');
- if (have_posts()) : while (have_posts()) : the_post();
- if($count == 0)
- {
- ?>
- <div class="col-xs-12 col-sm-4">
- <div class="column">
- <div class="news-article">
- <p class="news-date"><?php the_time( get_option( 'date_format' ) ); ?></p>
- <a href="<?php the_permalink(); ?>">
- <?php if ( has_post_thumbnail() ) { the_post_thumbnail('full', array( 'class' => 'img-responsive img-rounded news-img' )); } ?>
- <p class="news-headline"><?php the_title(); ?></p>
- </a>
- <p><?php the_excerpt(); ?></p>
- <a href="<?php the_permalink(); ?>">
- <p class="pull-right">Read more...</p>
- </a>
- <span class="clearfix"></span>
- </div>
- </div>
- </div>
- <?php
- $count = 1;
- }
- else
- {
- //Some other layout here
- }
- endwhile;
- endif;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement