Use the value instead of displaying it

By : sman591
Source: Stackoverflow.com
Question!

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...

By : sman591


Answers


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.





This video can help you solving your question :)
By: admin