BuddyDev

Search

[Resolved] Remove Profile Tabs Dropdown Menu

  • Participant
    Level: Enlightened
    Posts: 65
    Lisa Lagrou on #39794

    I don’t have it on the top main menu.

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #39814

    Hi Lisa,
    Thank you.

    You may remove the previous code and use this instead

    
    
    /**
     * Disable greedy nav for single item as well as directory tabs in Community Builder
     */
    function cb_bp_disable_greedynav_css_class( $classes ) {
    	$classes[] = 'no-greedy-nav';
    	return $classes;
    }
    add_filter( 'cb_bp_single_item_tabs_classes', 'cb_bp_disable_greedynav_css_class' );
    add_filter( 'cb_bp_dir_item_nav_classes', 'cb_bp_disable_greedynav_css_class' );
    
    

    It will remove the greedy nav from directory as well as profile/groups.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 65
    Lisa Lagrou on #39861

    What’s supposed to happen? It’s not working.

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #39862

    Hi Lisa,
    It adds a class to the item tabs. The script calling greedy nav is checking for it and should not call greedy nav.

    Please sure to to clear any cache in case the tabs/content are cached.

    If it is still not working, Please link me to a screenshot.

    Thank you
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 65
    Lisa Lagrou on #39971

    Hi, it’s not working. Maybe because “greedy-nav” class is still there. Here’s the screenshot:

    https://www.dropbox.com/s/0xmg77qqnyaj81i/Screen%20Shot%202021-08-06%20at%208.16.45%20PM.png?dl=0

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #39981

    Hi Lisa,
    Thank you for the screenshot., It seems something is wrong on our end. Please allow me to investigate and report back on Monday.

    The presence of greedy-nav class is ignored when no-greedy-nav is added.

    I am checking and will update you.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 65
    Lisa Lagrou on #40119

    Any luck yet with this?

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #40135

    Hi Lisa,
    I am sorry, I had used incorrect filter for the directory tabs that had no effect.

    Please remove the old code and use this instead.

    
    /**
     * Disable greedy nav for single item as well as directory tabs in Community Builder
     */
    function cb_bp_disable_greedynav_css_class( $classes ) {
    	$classes[] = 'no-greedy-nav';
    	return $classes;
    }
    add_filter( 'cb_bp_single_item_tabs_classes', 'cb_bp_disable_greedynav_css_class' );
    add_filter( 'cb_bp_dir_item_tabs_classes', 'cb_bp_disable_greedynav_css_class' );
    
    

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 65
    Lisa Lagrou on #40213

    THANK YOU! It works now 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #40216

    Thank you Lisa. I am glad it did.

    Regards
    Brajesh

The topic ‘ [Resolved] Remove Profile Tabs Dropdown Menu’ is closed to new replies.

This topic is: resolved