Drupal 7 hook_theme() not loading template file I'm trying to get a very simple module to load a template file using drupal's hook_theme(). It's pretty much as simple as you can possibly imagine.

function sectionheader_theme ( $existing, $type, $theme, $path ) {
  return array(
    'sectionheader' =&gt; array(
      'variables' =&gt; array( 'foo' =&gt; NULL ),
      'template' =&gt; 'sectionheader',
    ),
  );
}


The template is named sectionheader.tpl.php. The rest of the module is working as expected. I've cleared the Drupal cache. I've inserted a die("Debug") statement in this function, and it is being executed, but my template is simply not being called, ever. The template merely has some debug text in it so I can see that it's working, but is not visible in any view of the module.

I've done everything in every example I can find, I've even copied and pasted code directly from other modules, and this template will still not load.

I've tried renaming the template and the 'template' array value. No luck.
Try implementing hook_theme_registry_alter() in your module

function sectionheader_theme_registry_alter(&$theme_registry) {

  //register a template 
  $theme_registry['sectionheader'] = array(
    'template' => drupal_get_path('module', 'sectionheader').'/sectionheader',
    'type' => 'module',
  );
}

http://api.drupal.org/api/drupal/modules--system--system.api.php/function/hook_theme_registry_alter/7