Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
comment cleanup
  • Loading branch information
bschneidewind committed Feb 2, 2025
commit f9b7ef29b8da890a6f4f4b0b3b4ab54ea24cc2e2
5 changes: 3 additions & 2 deletions src/wp-includes/class-wp-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -4378,17 +4378,18 @@ public function is_front_page() {
$page_on_front = get_option( 'page_on_front' );
$page_for_posts = get_option( 'page_for_posts' );

// Most likely case.
// If Your Latest Posts is selected.
if ( 'posts' === $show_on_front && $this->is_home() ) {
return true;
}

if ( 'page' === $show_on_front ) {
// If a static homepage is set and we're on that page.
if ( $page_on_front && $this->is_page( $page_on_front ) ) {
return true;
}

// Edge case where the Reading settings has a posts page set but not a static homepage.
// Edge case where a posts page has been selected but a homepage is not set.
if ( $page_for_posts && ! $page_on_front && $this->is_home() ) {
return true;
}
Expand Down
Loading