Title: infinity scroll bug?
Last modified: August 21, 2016

---

# infinity scroll bug?

 *  Resolved [Jeong Daeho](https://wordpress.org/support/users/ohead/)
 * (@ohead)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/infinity-scroll-bug/)
 *     ```
       function query_time_filter( $where, $query ) {
       		global $wpdb;
   
       		$operator = 'ASC' == $query->get( 'order' ) ? '>' : '<';
   
       		// Construct the date query using our timestamp
       		$clause = $wpdb->prepare( " AND post_date_gmt {$operator} %s", self::set_last_post_time() );
   
       		$where .= apply_filters( 'infinite_scroll_posts_where', $clause, $query, $operator, self::set_last_post_time() );
   
       		return $where;
       	}
       ```
   
 * _[Please post code & markup between backticks or use the code button. Your posted
   code may now have been permanently damaged by the forum’s parser.]_
 * post_date_gmt????
 * {$wpdb->prefix}???
 * where is table name and db prefix?
 * [http://wordpress.org/extend/plugins/jetpack/](http://wordpress.org/extend/plugins/jetpack/)

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

 *  Plugin Contributor [Erick Hitter](https://wordpress.org/support/users/ethitter/)
 * (@ethitter)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/infinity-scroll-bug/#post-3663646)
 * The filter we use that function with, `posts_where`, is applied to the WHERE 
   clause in the query that WordPress builds to retrieve posts from the database.`
   post_date_gmt` is one of the columns in WP’s posts table. Since the `post_date_gmt`
   column only exists in the posts table, and the posts table is included in the
   query by WordPress already, we don’t need to include the table name because the
   column name isn’t ambiguous.
 * That said, there’s no harm in adding the table name to the clause Infinite Scroll
   appends, and we will consider that for a future release.
 *  Plugin Contributor [Erick Hitter](https://wordpress.org/support/users/ethitter/)
 * (@ethitter)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/infinity-scroll-bug/#post-3663653)
 * The next release of Jetpack will add the omitted table prefix.
 * The change was made in [http://plugins.trac.wordpress.org/changeset/698826](http://plugins.trac.wordpress.org/changeset/698826).

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

The topic ‘infinity scroll bug?’ is closed to new replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Erick Hitter](https://wordpress.org/support/users/ethitter/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/infinity-scroll-bug/#post-3663653)
 * Status: resolved