Skip to:
Content
Pages
Categories
Search
Top
Bottom

customizing buddypress profile page default tab and item-nav order


  • lwaltzer
    Participant

    @lwaltzer

    With the assistance of @boonebgorges, I was able change both the default tab that loads when you visit a BuddyPress profile page and the order of the tabs on profile pages.

    Both of these functions are called before theme files are, which was giving me trouble. Here’s how to do it:

    Default Tab:
    In your wp-config file, add the following line:

    define( ‘BP_DEFAULT_COMPONENT’, ‘preferred_default_tab’ );

    but make sure it’s above the require_once(ABSPATH . ‘wp-settings.php’); line, or else the change won’t take place.

    Item-Nav Order
    In plugins/bp-custom.php, I added

    function bbg_change_profile_tab_order() {
    global $bp;

    $bp->bp_nav = 10;
    $bp->bp_nav = 20;
    $bp->bp_nav = 30;
    $bp->bp_nav = 40;
    $bp->bp_nav = 50;
    $bp->bp_nav = 60;
    $bp->bp_nav = 70;
    }
    add_action( ‘bp_setup_nav’, ‘bbg_change_profile_tab_order’, 999 );

    and was able to order the tabs as I wanted. Thanks, Boone!

  • The topic ‘customizing buddypress profile page default tab and item-nav order’ is closed to new replies.
Skip to toolbar