Title: found_posts is always zero
Last modified: August 18, 2016

---

# found_posts is always zero

 *  [revbob](https://wordpress.org/support/users/revbob/)
 * (@revbob)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/found_posts-is-always-zero/)
 * In link-template.php:
 * function next_posts_link($label=’Next Page »’, $max_page=0) {
    global $paged,
   $wpdb, $wp_query; $foo = $wp_query->found_posts; echo “found_posts = ” . $foo;
   if ( !$max_page ) { $max_page = $wp_query->max_num_pages; }
 * and so on.
 * This always prints a zero.
 * Unless a max_page is supplied by the template, max_page (which is computed from
   found_posts in query.php) will be zero. Consequently, previous entries will never
   be shown.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [revbob](https://wordpress.org/support/users/revbob/)
 * (@revbob)
 * [19 years, 1 month ago](https://wordpress.org/support/topic/found_posts-is-always-zero/#post-543372)
 * Sorry, evidently the “Adhesive” plugin misbehaves on 2.1. When it’s disabled 
   the problem goes away.
 *  [Chris_K](https://wordpress.org/support/users/handysolo/)
 * (@handysolo)
 * [19 years, 1 month ago](https://wordpress.org/support/topic/found_posts-is-always-zero/#post-543373)
 * Thanks for the follow-up. And hey, [check here](http://wordpress.org/support/topic/107236?replies=1)
   for an updated adhesive type plugin.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘found_posts is always zero’ is closed to new replies.

## Tags

 * [template](https://wordpress.org/support/topic-tag/template/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Chris_K](https://wordpress.org/support/users/handysolo/)
 * Last activity: [19 years, 1 month ago](https://wordpress.org/support/topic/found_posts-is-always-zero/#post-543373)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
