bp_is_group_forum

Is the current page a group's forum page?.

Description

bp_is_group_forum(); 

Only applies to legacy bbPress forums.


Usage

  1. if ( !function_exists( 'bp_is_group_forum' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_is_group_forum(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-core/bp-core-template.php  
  1. function bp_is_group_forum() { 
  2. $retval = false; 
  3.  
  4. // At a forum URL. 
  5. $retval = true; 
  6.  
  7. // If at a forum URL, set back to false if forums are inactive, or not 
  8. // installed correctly. 
  9. if ( ! bp_is_active( 'forums' ) || ! bp_forums_is_installed_correctly() ) { 
  10. $retval = false; 
  11.  
  12. return $retval;