Answers for "how to run a loop in custom walker wordpress"

PHP
2

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();
Posted by: Guest on January-04-2022

Code answers related to "how to run a loop in custom walker wordpress"

Browse Popular Code Answers by Language