WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #22299, comment 3


Ignore:
Timestamp:
10/28/12 02:37:38 (3 years ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22299, comment 3

    initial v1  
    1 You can add `$query->is_home()` check there: 
     1You can add `$query->is_main_query() && $query->is_home()` check there: 
    22{{{ 
    33function hwl_home_pagesize( $query ) { 
    4         if ( $query->is_home() ) 
     4        if ( $query->is_main_query() && $query->is_home() ) 
    55                $query->query_vars['posts_per_page'] = 1; 
    66        return;