Make WordPress Core

Ticket #37530: query.patch

File query.patch, 514 bytes (added by dots, 9 years ago)

Now is_front_page() function is working when you set an static page for the front page and then modify the main query on start page to posts or any other custom post type except page.

  • query.php

     
    45014501                        return true;
    45024502                elseif ( 'page' == get_option( 'show_on_front') && get_option( 'page_on_front' ) && $this->is_page( get_option( 'page_on_front' ) ) )
    45034503                        return true;
     4504                elseif ('page' == get_option( 'show_on_front' ) && ! get_option( 'page_on_front' ) && get_option( 'page_for_posts' ))
     4505                        return true;
    45044506                else
    45054507                        return false;
    45064508        }