The MU forums have moved to WordPress.org

New tab next to "Your Profile" for people with no blogs (7 posts)

  1. horrorshow
    Member
    Posted 16 years ago #

    Hi, I am trying to add a new tab right next to "Your profile" for people without a blog.

    For people with blogs, I am able to do this through adding a submenu under "users.php"

    How do you do something similar to that for users without a blog?

    thanks for your help.

  2. horrorshow
    Member
    Posted 16 years ago #

    Looks like today I am answering all my questions.. ;)
    I am now using add_menu_page, instead of add_submenu_page.

    function addPluginToSubMenu(){
    add_menu_page('More Profile', 'More Profile', 0, __FILE__, 'more_intro_adminPage');
    }
    add_action('admin_menu', 'addPluginToSubMenu');

  3. boonika
    Member
    Posted 16 years ago #

    Thanks horror:) Useful info. I would like to add more fields inside My Profile menu. For example, I would like for members to be able to add Google Maps address. Any ideas?

  4. dsader
    Member
    Posted 16 years ago #

    Boonika: Would this help? Use the 'profile_personal_options' plugin hook from edit-users.php:
    Example:
    <?php function more_profile ($blah) {
    echo "Google Maps Form";
    return $blah;
    }
    add_action ('profile_personal_options', 'more_profile');
    ?>

  5. boonika
    Member
    Posted 16 years ago #

    Thanks Dsader. I'll try that.

  6. horrorshow
    Member
    Posted 16 years ago #

    FYI, in 1.5.1, the code that I've posted as a sample above doesn't work. You do get the top-level menu, but you'll get an error when click on it.

    I've resorted to going back to a sub-menu. Not as easy for the users to find it, but at least it's working.

  7. dsader
    Member
    Posted 16 years ago #

    Horrorshow,

    global $submenu;
    if ( !current_user_can('edit_users') ) {
    $submenu['profile.php'][55] = array(__('New Profile Menu'), 'read', 'new_profile_page');
    }

About this Topic

  • Started 16 years ago by horrorshow
  • Latest reply from dsader