When your website means business.

WP Query | Type: PHPBasic WP-query

As basic as it gets, for clarity’s sake; assumes use of WP Pagenavi for paging

<?php
$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
    endwhile;
endif;
wp_pagenavi( array( 'query' => $newslist ) );
wp_reset_query();
?>

Menu
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.
Accept
Cookies Notice