pagination - Wordpress get range of posts -


using wp_query, how can range of posts? when select category, want first until 6th post, on same page want 7th until 13th post.

it easy if using normal query.

ok,i found answer. looking 'wp_query range' , didn't find anything, started looking @ 'offset' , found plenty information. didn't think of sooner.

for else looking range:

$termid = $wp_query->get_queried_object_id();  $args = array(   'cat' => $termid,   'order' => 'desc',   'posts_per_page' => 6,   'offset' => 6 );  $category_posts = new wp_query($args); if($category_posts->have_posts()) :  while($category_posts->have_posts()) :  $category_posts->the_post(); 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -