Hi!
I want to remove the "All", "Mine", "Friends" tab filter menu. I made my own plugin where I filter some river activities, but I can't remove those tabs and I don't know why this code is not working:
elgg_unregister_menu_item('filter', array(
'name' => 'all',
'priority' => 500,
'contexts' => array('my_own_plugin_page'),
));
I also tried this code:
elgg_unregister_menu_item('filter', 'all');
So far no luck. I don't want to override the view, and the Elgg Docs show that code as one way to remove those tabs. Also previous elgg developers used those hooks, but still doesn't work for me.
Thanks!
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Cim@manacim

Cim - 0 likes
- rjcalifornia@rjcalifornia

rjcalifornia - 0 likes
- Sathish Kumar@rubon

Sathish Kumar - 0 likes
- Cim@manacim

Cim - 0 likes
- rjcalifornia@rjcalifornia

rjcalifornia - 0 likes
- Baptiste@baptisteturquet

Baptiste - 0 likes
- Nikolai Shcherbin@rivervanrain

Nikolai Shcherbin - 0 likes
You must log in to post replies.Override and edit content.php and place in
I did that, but that removed the tab filter everywhere. I just want to remove it in one place.
i gave like this and i didnt get the filter menu for the particular view ..
'filter_override' => ' ',
if u can try with that , i am not sure with my answer but it solved my problem .
Which place? You can use if (elgg_get_context() == 'name_of_context') {} to specify the change only in a particular context. If that page doesn't have a context, you can use:
Then use
Yeah but why the code posted above doesn't work? No themes are activated, and using core plugins.
Why put this on the Elgg docs if it doesn't work?
Hi,
I think I had the same problem, found one solution : https://community.elgg.org/discussion/view/2094594/roles-plugin-cant-hide-friends-tab-in-filter-menu-for-specific-role
Baptiste
Did you tried with this hook:
RTFM