How to theme a node form from my custom module?
Use this:

/**
 * Implements hook_form_alter().
 */
function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {

  switch ($form_id) {
    // Expected format: NODE_TYPE_MACHINE_NAME_node_form
    case 'resource_node_form':
      // Requires devel module to be installed.
      // See all available elements displayed using krumo.
      $dpm($form);
      break;
  }

}


Update:

Depending on the complexity of your layout, check Display Suite and Field Group modules, as their functionality might be what you need.

You can also follow up this article if you want to do this from a tpl file. The approach is similar to what you were trying to do.