Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm using different headers for in my wordpress/buddypress setup and I need a conditional statement for member pages. So everything that comes after mysite.com/members/. How do I do that with something like is_page()?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Try this function bp_is_members_component().

share|improve this answer
    
I tried using it like if (bp_is_members_component()){ but that didn't work. –  Pollux Khafra Mar 10 '12 at 15:03
    
Where did you use that conditional check? Tested bp_is_members_component() and returns true on members directory page. –  Mamaduka Mar 10 '12 at 15:39
    
I used it in my header.php. <?php if (is_single()){ include(STYLESHEETPATH.'/header-post.php');} elseif (bp_is_members_component()){ include(STYLESHEETPATH.'/header-post.php');} else { include(STYLESHEETPATH.'/header-default.php');} ?> –  Pollux Khafra Mar 10 '12 at 15:53
    
It still returned the default header. –  Pollux Khafra Mar 10 '12 at 15:54
    
Tested in header.php and works fine. –  Mamaduka Mar 10 '12 at 16:18
show 3 more comments

Your Answer

 
discard

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.