Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $args = array(
- 'category_name' => 'news',
- 'posts_per_page' => 3,
- 'oder' => 'ASC',
- );
- $my_query = new WP_Query( $args );
- if( $my_query->posts ){
- foreach( $my_query->posts as $post ){
- setup_postdata( $post );
- }
- }
- wp_reset_postdata(); ?>
- <article id="two" class="wrapper alt style2">
- <section class="spotlight">
- <div class="image"><?php the_post_thumbnail(array(748,529)); ?></div><div class="content">
- <a href="<?php the_permalink(); ?>"><h2><?php the_title(); ?></h2></a>
- <p><?php the_content();?></p>
- </div>
- </section>
- </article>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement