Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wp_query

<?php 
	$display_posts = -1; // dispay all posts
    $args = array(
		'post_type' => 'post',
		'posts_per_page' => $display_posts,
		// 'orderby' => 'date',
		// 'order' => 'DESC',
		'post_status' => 'publish',
	);
    $QUERY = new WP_Query($args);    ?>
    <?php if($QUERY->have_posts()): ?>
        <?php while ($QUERY->have_posts()): $QUERY->the_post(); ?>

        <?php endwhile; wp_reset_query();?>
    <?php endif; ?>
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
9+2 =