Skip to:
Content
Pages
Categories
Search
Top
Bottom

My account menu

Viewing 5 replies - 1 through 5 (of 5 total)

  • bp-help
    Participant

    @bphelp

    @mojomateo
    I am pretty sure you would have to build the menu manually in your themes header.php if you are trying to get it like the buddyboss demo’s. Depending on your skill level it could be easy to difficult and you would also have to style it and the sub menu’s CSS. I dont know of a plugin or widget that would do it exactly like the buddyboss demo example but you can try this plugin:
    https://wordpress.org/plugins/buddymenu-buddylinks/


    mathieu.urstein
    Participant

    @mojomateo

    @bphelp
    Thanks for your answer,
    The top-right menu is already perfect I just need to hook it into my template.

    There is probably something to do 🙂


    mathieu.urstein
    Participant

    @mojomateo

    This is the hook for the admin toolbar:

    		$wp_admin_bar->add_menu( array(
    			'parent'    => 'my-account',
    			'id'        => 'my-account-buddypress',
    			'title'     => __( 'My Account' ),
    			'group'     => true,
    			'meta'      => array(
    				'class' => 'ab-sub-secondary'
    			)
    		) );

    Is there a way to call this for somwhere else than the toolbar?


    Renato Alves
    Moderator

    @espellcaste

    I think he uses the WP Admin bar but it seems he styled it to look that way. Take a look at his code and tweak with it and you will see.

    I’m working on a BP now and haven’t found a good solution yet. So I’m creating the same structure from scracth, just “copying” the idea.


    mathieu.urstein
    Participant

    @mojomateo

    @espellcaste
    do you have some news?
    I have been able to take the notifications like this :

    // notifications
    function my_bp_adminbar_notifications_menu() {
    	global $bp;
    
    	if ( !is_user_logged_in() )
    		return false;
    
    	echo '<li id="menu-item-9991" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-9991 parent">';
    //	_e( 'Alerts', 'buddypress' );
    
    	if ( $notifications = bp_core_get_notifications_for_user( $bp->loggedin_user->id ) ) { ?>
    		<a href="#"><span id="notifs_top"><?php echo count( $notifications ) ?></span></a>
    	<?php
    	}
    
    	echo '</a>';
    	echo '<ul class="sub-menu">';
    
    	if ( $notifications ) {
    		$counter = 0;
    		for ( $i = 0; $i < count($notifications); $i++ ) {
    			$alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; ?>
    
    			<li<?php echo $alt ?>><?php echo $notifications[$i] ?></li>
    
    			<?php $counter++;
    		}
    	} else { ?>
    
    		<li><a href="<?php echo $bp->loggedin_user->domain ?>"><?php _e( 'You have no new alerts.', 'buddypress' ); ?></a></li>
    
    	<?php
    	}
    
    	echo '</ul>';
    	echo '</li>';
    }
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘My account menu’ is closed to new replies.
Skip to toolbar