[buddypress-trac] [BuddyPress Trac] #9259: page_on_front dropdown on secondary sites includes items from root site
buddypress-trac
noreply at wordpress.org
Fri Dec 26 03:09:40 UTC 2025
#9259: page_on_front dropdown on secondary sites includes items from root site
--------------------------+---------------------
Reporter: boonebgorges | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 15.0.0
Component: Blogs | Version:
Severity: normal | Resolution:
Keywords: |
--------------------------+---------------------
Comment (by vapvarun):
Attaching a patch that implements the suggested fix - bailing out of
`bp_core_include_directory_on_front()` when not on the root blog.
'''The Change:'''
{{{
#!php
// BP pages are only relevant on the root blog in multisite.
if ( ! bp_is_root_blog() ) {
return $pages;
}
}}}
This check is added right after the existing query parser check, so on
secondary sites in multisite, the function returns early and doesn't add
BP directory pages to the `page_on_front` dropdown.
'''Testing (subdirectory multisite):'''
{{{
=== ROOT BLOG (site 1) ===
bp_is_root_blog(): true
Homepage dropdown options: Activity, Groups, Members, Sample Page, Sites
=== SECONDARY SITE ===
bp_is_root_blog(): false
Homepage dropdown options: Sample Page (only)
}}}
Verified in browser - BP pages from the root site no longer appear in the
Settings > Reading > Homepage dropdown on secondary sites.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/9259#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list