[buddypress-trac] [BuddyPress Trac] #9330: Fix `bp_is_site_home()` to ignore query strings

buddypress-trac noreply at wordpress.org
Sun May 31 17:05:51 UTC 2026


#9330: Fix `bp_is_site_home()` to ignore query strings
--------------------------+------------------------------
 Reporter:  indigetal     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Core          |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------
Changes (by indigetal):

 * component:  Activity => Core


Comment:

 Set component to Core. The fix is in `bp-core-template.php` and applies to
 any directory used as the static front page.

 Many BuddyPress communities set a directory (Activity, Members, Groups,
 etc.) as the WordPress homepage. That is a supported, common setup.
 However, once the homepage URL carries *any* query string, such as a
 filter, pagination, campaign tracking, or a shared link like
 `/?ref=newsletter` — `bp_is_site_home()` can return false and BuddyPress
 never treats the request as the directory front page. Members see a broken
 or empty homepage instead of the community feed they expect.

 The ticket describes the technical cause, but the actual community impact
 is much broader: query args are a normal part of the web, not an edge
 case. Extensions that add directory filtering, search refinements, or deep
 links should not each ship a `bp_get_requested_url` workaround to strip
 their own parameters. That does not scale when several plugins are active,
 and it is easy to miss a parameter and still break routing.

 `9330.patch` compares URL paths only (the same path-only approach already
 used in the Customizer preview branch). No change for plain
 `https://example.com/` requests; fixes homepage-as-directory for all
 components when query args are present.

 That fix would help the ecosystem in practical ways:

 * Reliable community homepages when site owners use a BuddyPress directory
 as the front page
 * Shared and bookmarked links that include query parameters (filters,
 topics, tracking) still load the directory
 * Extensions can add homepage directory features without fighting core URL
 detection

 Core behavior stays the same for sites that do not use a directory as the
 homepage. The patch is attached whenever review fits your schedule.

 Thanks for considering it.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/9330#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list