Hide specific sections on admin configuration page I wondering how I may hide some sections on the administration configuration page? I would like to hide some sections entirely for instance the media section and then only remove certain items for others, under the system section I only like to remove the cron item.

I tried to alter the admin/config page using hook_admin_paths_alter() and hook_preprocess_page() but without any luck. Would be nice if some one could point me in the right direction on how to achive this.

function MODULE_admin_paths_alter(&amp;$paths) {
   // hide some paths
   $paths['admin/config/system/cron'] = FALSE;
}


function MODULE_preprocess_page(&amp;$variables) {
  if(path_is_admin(current_path())) {
    // I don't know how to modify the markup of the page
    // tried to add a template called page--admin--config.tpl.php but
    // without any luck
  } 
}


In the end I used @Captain Pants solution:

function pe_admin_permission() {
  return array(
    'access extended config' =&gt; array(
        'title' =&gt; t('Access Extended Configurations'),
        'description' =&gt; t('Gives a user access to extended configuration pages.'),
        'restrict access' =&gt; TRUE,
    ),
  );
}

function pe_admin_menu_alter(&amp;$items) {
  // add all items you would like to hide here
  // if you hide all items in a specific section the entire block
  // will be removed
  $sections = array(
    'admin/config/system/cron',
    'admin/config/system/actions',
    'admin/config/system/mimemail',
    'admin/config/system/mailsystem',
    'admin/config/date/date_popup',
  );

  // loop through each item you would like to hide
  foreach($sections as $section) {
    $items[$section]['access callback'] = 'user_access';
    $items[$section]['access arguments'] = array('access extended config');
  }
}
You have stated that it would be "nice" to have these paths inaccessible. If a user is not supposed to have access to this paths then you should go above and beyond just "hiding links so nobody can see". Here is the solution to both remove those links from the config page AND having those links inaccessible if one were to type in the url in their address bar. 

You will need to make a module with the following code. Note: I'm only doing this for the cron config page.

/**
 * Implements hook_permission().
 */
function my_module_permission() {

  return array(
    'access cron config' =&gt; array(
      'title' =&gt; t('Access Cron Config'),
      'description' =&gt; t('Gives a user access to the cron configuration page.'),
      'restrict access' =&gt; TRUE,
    ),
  );
}

/**
 * Implements hook_menu_alter().
 */
function my_module_menu_alter(&amp;$items) {

  $items['admin/config/system/cron']['access callback'] = 'user_access';
  $items['admin/config/system/cron']['access arguments'] = array('access cron config');
}


This will give you the "Access Cron Config" permission on the permissions page and there you can choose which role has the cron page appear for them.

Please research more on hook_permission and hook_menu_alter for clarification on how to do this for the media pages.