Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to change css_id for nab-items and subnav-items…


  • Frank G.
    Participant

    @garprogram

    I can’t remove, only change id for css

    function sci_hide_tabs() {
     global $bp;
     if (!is_super_admin() && !bp_is_my_profile() ) {
        error_log('Add CSS');
        $bp->bp_nav['profile']['css_id'] = 'profile-hidden';               // WORKING
        $bp->bp_opt_nav['profile']['public']['css_id'] = 'public-hidden';  //NOT WORKING
     }        
    }
    add_action( 'bp_setup_nav', 'sci_hide_tabs', 15 );

    Any filter for this?

    in the $bp->bp_opt_nav …. I receive an error in logs:

    PHP Notice: Indirect modification of overloaded property BuddyPress::$bp_opt_nav has no effect in …/wp-content/plugins/bp-custom.php on line 53

Viewing 1 replies (of 1 total)

  • Frank G.
    Participant

    @garprogram

    I respond my question….. I must rest
    Error in my code….

    $bp->bp_opt_nav[‘profile’][‘public’][‘css_id’] = ‘public-hidden’;
    $bp->bp_options_nav[‘profile’][‘public’][‘css_id’] = ‘public-hidden’;

Viewing 1 replies (of 1 total)
  • The topic ‘How to change css_id for nab-items and subnav-items…’ is closed to new replies.
Skip to toolbar