WordPress.org

Making WordPress.org

Ticket #3708: 3708.diff

File 3708.diff, 680 bytes (added by obenland, 4 years ago)
  • wp-content/plugins/handbook/handbook.php

     
    330330        }
    331331
    332332        function pre_get_posts( $query ) {
    333                 $query->is_handbook_root = false;
     333                if ( $query->is_main_query() && ! property_exists( $query, 'is_handbook_root' ) ) {
     334                        $query->is_handbook_root = false;
     335                }
    334336
    335337                if ( $query->is_main_query() && ! $query->is_admin && ! $query->is_search && $query->is_post_type_archive( $this->post_type ) ) {
    336338                        // If the post type has a page to act as an archive index page, get that.