Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to change the Backend Edit My Profile Link in Admin bar

  • @jaxdestroyer

    Participant

    Hey I’ve been developing a site and I wanted my users to only see and use the Buddypress profile. I noticed that when I am in the backend(where you create and edit posts) of the site the Edit My Profile link changes from my Buddypress profile edit page to their wordpress profile page. I want it to only go to the Buddypress one. This way the users can only see and edit 1 profile. I already got rid of the link in the left sidebar of the backend all that is left is to update the buddypress created one.
    I have been looking all over and have found nothing on this particular one other than disable the backend altogether. Which doesn’t work for me cause All members are allowed to make their own posts.

    wordpress 3.7 Note this was happening back in WP 3.6.1 as well
    buddypress 1.8.1

Viewing 1 replies (of 1 total)
  • @danbp

    Participant

    hi @jaxdestroyer,

    play with these example snippets (goes into theme’s functions.php) and see what you can do with it.

    Good luck!

    
    /* remove the comment menu */
    
    function bpfr_admin_bar_render() {
    	global $wp_admin_bar;
    	$wp_admin_bar->remove_menu('comments'); // change to your need
    	}
    add_action( 'wp_before_admin_bar_render', 'bpfr_admin_bar_render' ); */
    
    /* add links/menus to the admin bar */
    
    function bpfr_admin_bar_render() {
    	global $wp_admin_bar;
    	$wp_admin_bar->add_menu( array(
    	'parent' => 'new-content', // use 'false' for a root menu, or pass the ID of the parent menu
    	'id' => 'new_media', // link ID, defaults to a sanitized title value
    	'title' => __('Media'), // link title
    	'href' => admin_url( 'media-new.php') // name of file
    	'meta' => false // array of any of the following options: array( 'html' => '', 'class' => '', 'onclick' => '', target => '', title => '' );
    	));
    	}
    add_action( 'wp_before_admin_bar_render', 'bpfr_admin_bar_render' ); 
    
    /* another example */
    function bpfr_custom_myaccount_nav( $wp_admin_bar ) {
    global $bp;
    
    	// remove the Settings item and the attached sub menu
    	$wp_admin_bar->remove_node('my-account-settings');
    	
        // add My notifications settings as separate item
       $args = array(
    		'id' => 'my-account-settings-notifications',
    		'title' => 'Notifications Settings',
    	//	'parent' => 'my-account',
    		'parent' => 'my-account-messages',
    	//	'meta' => array('class' => 'menupop')	
    		'meta' => array('class' => 'ab_sub_wrapper')		
    		); 
        $wp_admin_bar->add_node($args); 	
    
    }
    add_action('admin_bar_menu', 'bpfr_custom_myaccount_nav',100 );
    
    

    Some other examples here

Viewing 1 replies (of 1 total)
  • The topic ‘How to change the Backend Edit My Profile Link in Admin bar’ is closed to new replies.
Skip to toolbar