Return to Snippet

Revision: 57754
at June 8, 2012 09:38 by thescottlee


Initial Code
<?php 

	// Start WP_Query for only the ID's from above
	$first_query = new WP_Query(
	array(
		'post_type' => 'page',
		'post__in' => array(6,7,8),
        'category_name' => 'stuff',
		)
	); 

?>

<?php while($first_query->have_posts()) : $first_query->the_post(); ?>
	<?php the_title(); ?>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>

Initial URL


Initial Description
For more parameters: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters

Initial Title
Sample WP_Query

Initial Tags
wordpress

Initial Language
PHP