Skip to:
Content

BuddyPress.org

Changeset 13695


Ignore:
Timestamp:
01/13/2024 10:09:27 AM (13 months ago)
Author:
imath
Message:

Block Themes: use the right template when a BP Directory is front page

Only overriding the $wp_query->is_home property is misleading the template pick for these kind of themes, the $wp_query->is_front_page property also needs to be set as true.

Props emaralive

Fixes #9067 (branch 12.0)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/12.0/src/bp-core/bp-core-catchuri.php

    r13522 r13695  
    177177
    178178            // Check if a BuddyPress component's direcory is set as homepage.
    179             $wp_query->is_home = bp_is_directory_homepage( bp_current_component() );
     179            if ( bp_is_directory_homepage( bp_current_component() ) ) {
     180                $wp_query->home          = true;
     181                $wp_query->is_front_page = true;
     182            }
    180183        }
    181184
Note: See TracChangeset for help on using the changeset viewer.