Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wordpress custom loop

$args = array(
  'post_type'      => $post,
  'post_status'    => 'publish',
  'posts_per_page' => $post_total,
  'orderby'        => 'publish_date',
  'order'          => 'DESC'
);
$loop = new WP_Query( $args );

while ( $loop->have_posts() ): $loop->the_post();
	// Your code
endwhile;
wp_reset_postdata();
Source by codex.wordpress.org #
 
PREVIOUS NEXT
Tagged: #wordpress #custom #loop
ADD COMMENT
Topic
Name
1+4 =