WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to assign a special template only to buddypress pages (activity, members, profile...). All other posts / pages use a different template. Problem is: I just can't find a good way to tell if a page is "rendered" by buddypress or by the wp "core". I've looked in the bp codex and found the template tag bp_is_member() and others, but none for an overall approach. Are there hooks that I could use or other template tags that I didn't find?

I'm not looking for a customization of the sidebar only, so conditional widget plugins won't do the job.

Any help is appreciated Heiner

share|improve this question
up vote 1 down vote accepted

bp_current_component() does not necessarily return a boolean - it returns false if not in a BP component, but will return the name of the component otherwise, as a string.

Internally, BP uses the function bp_is_blog_page() to do what you're asking - if it returns true, it's not a BP page.

share|improve this answer
Thanks, that is a perfect solution! – Heiner Mar 21 '12 at 11:02

Ok, I've found the solution to my problem. Buddypress offers a simple function that returns a boolean value:


Now all I have to do is call that function and include it in an if else statement.

Thanks to ZaMoose who has found this easy solution http://xrl.us/bmxm8e

Hope this helps some else also.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.