David Carpenter
David Carpenter

Reputation: 1640

Wordpress query_posts(...) by page

With wordpress I am trying to figure out how to get the current page number and use it with the query_posts function i have tried passing in page=1 but that doesnt seem to work

query_posts( "cat=4&posts_per_page=1" ); // how do i pass in the page number???

Upvotes: 0

Views: 684

Answers (1)

Billy Martin
Billy Martin

Reputation: 257

query_posts( array( 'cat' => 8, 'posts_per_page' => 25, 'paged' => get_query_var('page') ) );

Upvotes: 1

Related Questions