Remove tasks and index when creating a menu tab from views I am using views to create a menu tab for my views page and it works fine accept it comes with two unexpected tabs: Tasks and Index, which are showed in the photo below. Is there any way to remove them? Thanks.
You can achieve this using hook_menu_local_tasks_alter hook.


  Alter tabs and actions displayed on the page before they are rendered.


function hide_tabs_menu_local_tasks_alter(&amp;$data) {
    foreach ($data['tabs'][0]['output'] as $key =&gt; $value) {
        if ($value['#link']['path'] == "check your path") {
          unset($data['tabs'][0]['output'][$key]);
        }
    }
}


You can also take a look on Tab Tamer module.


  Tab Tamer is an administration utility that provides easy re-ordering,
  hiding, and deactivation of tabs and subtabs. You can also rename tab
  labels.
  
  Tab Tamer makes use of Drupal's drag ordering, but degrades gracefully
  when javascript is disabled.
  
  Tab Tamer utilizes Drupal's cache system to help conserve server
  resources.