daanial
11/16/2013 - 12:35 PM

WP Simple Query / Loop

WP Simple Query / Loop

<?php  $recentPosts = new WP_Query();
       $recentPosts->query('showposts=3&cat=9');?>
<?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?>

			<article>
				<h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
				<p><?php content('12');?></p>
			</article>
			
			<?php endwhile; ?>