views:

33

answers:

3

I'm trying to use bp_group_name() in

if (bp_group_name()!='General') {
//code
}

Instead of using the value of bp_group_name() in the IF, it displays the value on the page.

Sorry if the way I described this was a bit off...

+2  A: 

bp_get_group_name() ?

http://bp-dev.org/phpxref/_functions/bp_get_group_name.html

Tom Haigh
thanks for the speedy response!
sman591
A: 
bp_get_group_name()

http://phpxref.ftwr.co.uk/buddypress/nav.html?_functions/index.html

vinhboy
+1  A: 

You have to use a function that returns a value instead of a function that echoes a value.

if (bp_get_group_name() != 'General') 
{
    //code
}

Here's a discussion of using code that's similar to yours and probably trying to do a similar thing.

Peter Ajtai