Trouble adding posts_per_page limit to a query
-
I can’t get the posts_per_page to blend into this query… can’t find any writing on this script which is just using “query” instead of “query_posts”, so confused, please help!
$tempWPQuery = $wp_query; $wp_query = null; $wp_query = new WP_Query(); // Issue a query that returns 4 posts in a particular category $wp_query->query('category_name=featured-item'); while ($wp_query->have_posts()): //display stuff instructions..
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Trouble adding posts_per_page limit to a query’ is closed to new replies.