Get the number of posts from the current page results

I am trying to get the current number of posts that will be present in a page. $wp_query->found_posts will give me the total number of posts in the loop. get_query_var( ‘posts_per_page’ ) will tell me the number of posts per page. get_query_var( ‘paged’ ) will give me the current page number. sticky posts seem to … Read more

Custom Taxonomy not working with posts_per_page in new WP_query (pagination problem)

OK, so i’m messing with Custom Taxonomies for the second time and in both instances i’ve run into this problem where using the posts_per_page argument in either a query_posts or WP_query scenario.. basically, if i set a custom limit on posts per page, clicking the “next” or “previous” buttons give me 404 errors .. doesnt … Read more

What is the difference between $paged and $page?

I’m creating pagination for my site. Hope everyone can explain to me what below code used for? Thanks in advance. <?php if ( get_query_var(‘paged’) ) { $paged = get_query_var(‘paged’); } elseif ( get_query_var(‘page’) ) { $paged = get_query_var(‘page’); } else { $paged = 1; } query_posts(‘paged=’.$paged.’&posts_per_page=”); ?> 1 1 I hope you understand what query … Read more

get_query_var( ‘paged’ ) not working outside of homepage

Twenty Eleven Theme… On the home page, I have successfully filtered the loop to display just “Featured” posts with pagination functioning properly through nav links. I’m trying to display posts from all categories on another page called “Unfiltered.” Why do the nav links disappear when used on this other page? edit: if I change the … Read more

How can I create a category landing page followed by pages of posts?

I’m trying to create a category template in my theme that will display static content if the user is on the first page of the archive, and then display the posts in the category on the following pages. I’m basically trying to replicate the category behavior on Wired.com where http://www.wired.com/category/design is a landing page while … Read more