Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: optionsbar & userbar’s Not Hidden on Directory Pages


Burt Adsit
Participant

@burtadsit

Hi everyone.

Priority 5 :

1. bp_core_directory_members()

2. bp_core_search_site()

3. bp_blogs_directory_blogs_setup()

4. groups_directory_groups_setup()

That’s a partial dump of the hooks that run for the action ‘wp’.

All those fns get triggered on each page load. The purpose of all of them is to detect if a directory is being viewed or the search fn is being run.

Let’s just look at the members directory and it’s fn bp_core_directory_members() in bp-core.php

In that fn is the line:

if ( !is_home() && is_null( $bp->displayed_user->id ) &&
$bp->current_component == $bp->default_component ) {

That’s what bp uses to determine if the member’s directory is running. Underneath that line is $bp->is_directory = true which shuts down the option and user bars. Either that line is failing, your theme isn’t triggering this fn or something is setting $bp->is_directory to false again.

This works just fine in the default themes with 1.0 and wpmu 2.7.1.

Skip to toolbar