How can I remove the "Friend collections" menu item from sidebar?

I tried unregistering  the 'Friend collections' item in start.php of my theme package.

elgg_unregister_menu_item('page', 'friends:view:collections');

This has no effect.

  • That's because the menu item is registered in the 'system', 'pagesetup' event.  You can't unregister it before it's registered :)

    You can either move that line to the pagesetup event, or use the 'register', 'menu:page' plugin hook and remove it from the array directly.

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