Remove items from the menu below profile picture


I want to remove the send message and add friend below the picture on the profile page.

How can I do that?

Thank you

  • This is displayed via the profile/owner_block view in the profile plugin. This view manually renders the "user_hover" menu, so you can register for the [register, menu:user_hover] hook and remove those items from the list, though you'll only want to do it if current_page_url() matches the profile URL format.

    So in your plugin:

    if (/* URL matches */) {
        function my_plugin_register_user_hover($hook, $type, $value, $params) {
            /* alter and return $value */
        elgg_register_plugin_hook_handler("register", "menu:user_hover", "my_plugin_register_user_hover");
  • Thanks for the reply @Steve Clay

    So to remove the buttons send message and add friend below the picture of the other users I need to create a new plugin that need to have that code at the start.php


Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking