Skip to:
Content

BuddyPress.org

Changeset 13694


Ignore:
Timestamp:
01/13/2024 10:00:44 AM (5 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

See #9067 (trunk)
Closes https://github.com/buddypress/buddypress/pull/216

File:
1 edited

Legend:

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

    r13686 r13694  
    194194
    195195            // Check if a BuddyPress component's direcory is set as homepage.
    196             $wp_query->is_home = bp_is_directory_homepage( bp_current_component() );
     196            if ( bp_is_directory_homepage( bp_current_component() ) ) {
     197                $wp_query->home          = true;
     198                $wp_query->is_front_page = true;
     199            }
    197200        }
    198201
Note: See TracChangeset for help on using the changeset viewer.