WordPress.org

Make WordPress Core

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


Ignore:
Timestamp:
10/28/2012 02:37:38 AM (6 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;