Custom Post Type Template

<?php
/*
Plugin Name: Hyp Coaches
Plugin URI: http://hyperspatial.com
Description: Custom post type for coaches
Author: Adam J Nowak
Version: 1.0
Author URI: http://hyperspatial.com
*/

//File Paths
define('HYPC_PLUGIN',WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)) . '/');
define('HYPC_PLUGIN_SERVERPATH',dirname(__FILE__) . '/');

$hyp_coaches = new HypCoaches();

class HypCoaches{
public function __construct(){
add_action('init',array(&$this,'init'));
add_filter('post_updated_messages',array(&$this,'updated_messages'));
//add_action('add_meta_boxes',array(&$this,'add_meta_boxes'));
//add_action('save_post',array(&$this,'save_post'));
}
public function init(){
$labels = array(
'name' => _x('Coaches','post type general name','terra'),
'singular_name' => _x('Coach','post type singular name','terra'),
'add_new' => _x('Add New','coach','terra'),
'add_new_item' => __('Add New Coach','terra'),
'edit_item' => __('Edit Coach','terra'),
'new_item' => __('New Coach','terra'),
'all_items' => __('All Coaches','terra'),
'view_item' => __('View Coach','terra'),
'search_items' => __('Search Coaches','terra'),
'not_found' => __('No coaches found','terra'),
'not_found_in_trash' => __('No coaches found in Trash','terra'),
'parent_item_colon' => '',
'menu_name' => __('Coaches','terra')
);
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => true,
'menu_position' => null,
'menu_icon' => HYPC_PLUGIN . 'icon-coach.png',
'supports' => array('title','editor','author','thumbnail','excerpt','comments','custom-fields','revisions')
);
register_post_type('coach',$args);

//Taxonomy
$labels = array(
'name' => _x( 'Subjects', 'taxonomy general name' ),
'singular_name' => _x( 'Subject', 'taxonomy singular name' ),
'search_items' => __( 'Search Subjects' ),
'all_items' => __( 'All Subjects' ),
'parent_item' => __( 'Parent Subject' ),
'parent_item_colon' => __( 'Parent Subject:' ),
'edit_item' => __( 'Edit Subject' ),
'update_item' => __( 'Update Subject' ),
'add_new_item' => __( 'Add New Subject' ),
'new_item_name' => __( 'New Subject Name' ),
'menu_name' => __( 'Subject' ),
);
$args = array(
'hierarchical' => true,
'labels' => $labels,
'show_ui' => true,
'show_admin_column' => true,
'query_var' => true,
//'rewrite' => array( 'slug' => 'slugname' ),
);
register_taxonomy('subjects','coach',$args);
}

/* Updated Messages */
public function updated_messages($messages){
global $post, $post_ID;
$messages['coach'] = array(
0 => '',
1 => sprintf( __('Coach updated. <a href="%s">View coach</a>'), esc_url( get_permalink($post_ID) ) ),
2 => __('Custom field updated.'),
3 => __('Custom field deleted.'),
4 => __('Coach updated.'),
5 => isset($_GET['revision']) ? sprintf( __('Coach restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
6 => sprintf( __('Coach published. <a href="%s">View coach</a>'), esc_url( get_permalink($post_ID) ) ),
7 => __('Coach saved.'),
8 => sprintf( __('Coach submitted. <a target="_blank" href="%s">Preview coach</a>'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
9 => sprintf( __('Coach scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview coach</a>'),
date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ),
10 => sprintf( __('Coach draft updated. <a target="_blank" href="%s">Preview post</a>'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
);
return $messages;
}

/* Add meta box */
public function add_meta_boxes(){
add_meta_box(
'slug_name',
'Title Text',
array(&$this,'meta_box_1'),
'coach',
'advanced',
'high'
);
}

/* Meta box content */
public function meta_box_1($post){
wp_nonce_field(plugin_basename(__FILE__),'hyp_noncename');
$this->print_mce($post->ID,'metaname');
}

/* MCE */
private function print_mce($post_id,$metaname){
$content = get_post_meta($post_id,$metaname,1);
$wp_editor_args = array(
'teeny' => 1,
'textarea_rows' => 4,
'media_buttons' => true,
'dfw' => false,
'tinymce' => array(
'theme_advanced_buttons1' => 'formatselect,fontsizeselect,forecolor,backcolor|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,|,undo,redo,|,spellchecker',
'theme_advanced_buttons2' => 'cut,copy,paste,pastetext,pasteword,|,bullist,numlist,|,outdent,indent,|,fullscreen',
'theme_advanced_buttons3' => '',
'theme_advanced_buttons4' => ''
),
'quicktags' => true
);
wp_editor($content,$metaname . '_html',$wp_editor_args);
}

/* Save Postdata */
public function save_postdata($post_id){
if(defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return;
if($_POST['post_type'] != 'coach') return $post_id;
if(!wp_verify_nonce($_POST['hyp_noncename'],plugin_basename(__FILE__))) return $post_id;
if(!current_user_can('edit_post',$post_id)) return $post_id;
update_post_meta($post_id,'slug_name',$_POST['metaname_html']);
}
}//END HypCoach
?>

Self comment template

<?php

/* Template Comment */
function wco_template_comment($file){
$replace = '/var/www/adam/weddingcolorado.org/wp-content/';
$template_loc = str_replace($replace,'',$file);
echo "<!-- Template: $template_loc -->";
}

//Add to the top of your template
wco_template_comment(__FILE__);

?>