#6725 closed defect (bug)
Problem with bp_is_group_activity()
Reported by: | henry.wright | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Core | Keywords: | |
Cc: |
Description
There seems to be a problem with bp_is_group_activity()
For example, when viewing example.com/groups/group-name, I'd expect the following to output true
. It actually outputs false
.
function my_test() { if ( bp_is_group_activity() ) { echo "true"; } else { echo "false"; } } add_action( 'bp_before_group_activity_post_form', 'my_test' );
Change History (7)
#2
@
9 years ago
Hi @r-a-y, thanks for pointing out the article! I hadn't seen it yet, so just read through it.
Regarding the problem, I think it still remains because:
- I'm using v2.3.5
- I'm using the group's activity as my group "home"
#5
@
9 years ago
- Milestone Awaiting Review deleted
- Status changed from new to closed
- Version 2.3.3 deleted
For example, when viewing example.com/groups/group-name, I'd expect the following to output true. It actually outputs false.
Regarding bp_is_group_activity()
returning false
in BP 2.3.x, see imath's comment about this:
https://buddypress.trac.wordpress.org/ticket/6388#comment:23
In BP 2.4.0, I can confirm that bp_is_group_activity()
returns true
when you land on a group's permalink (example.com/groups/group-name
) without any custom front pages.
Going to mark this as a duplicate of #6388.
Hi henry.wright,
Are you testing on BuddyPress 2.3 or 2.4?
In 2.4.0, we've made some changes to this function due in part to the custom group homepage feature.
See the bpdevel post about this:
https://bpdevel.wordpress.com/2015/10/03/get-ready-2-4-0-will-introduce-important-changes-in-groups-homes/
Specifically the "Important changes in some Group’s conditional tags" section.