When your website means business.

WP Query | Type: PHPBasic WP-query

As basic as it gets, for clarity’s sake.

$args = array(
  'post_type' => 'news',
  'posts_per_page' => '5', 
  'cat' => '8'
$newslist = new WP_Query($args);
if ($newslist-> have_posts()): 
   while ($newslist->have_posts()): $newslist->the_post();

Do stuff

  <?php endwhile; ?>
<?php endif; ?>
<?php wp_pagenavi( array( 'query' => $newslist ) ); ?>
<? wp_reset_query(); ?>
We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.