Created
May 9, 2012 22:58
-
-
Save zanematthew/2649552 to your computer and use it in GitHub Desktop.
This the contents of our Events Post Type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This file is located in models/events.php | |
$tmp_cpt = 'events'; | |
$event = new Events(); | |
$event->post_type = array( | |
array( | |
'name' => 'Race Event', | |
'type' => $tmp_cpt, | |
'has_one' => 'tracks', // add support 'has_many' => 'other_cpt' | |
'rewrite' => array( | |
'slug' => 'events' | |
), | |
'supports' => array( | |
'title', | |
'editor', | |
'comments' | |
), | |
'taxonomies' => array( | |
'type', | |
'bmx_rs_tag', | |
'attendees' | |
) | |
) | |
); | |
$event->taxonomy = array( | |
array( | |
'name' => 'type', | |
'post_type' => $tmp_cpt, | |
'menu_name' => 'Type' | |
), | |
array( | |
'name' => 'bmx_rs_tag', | |
'post_type' => $tmp_cpt, | |
'menu_name' => 'BMX Tags', | |
'slug' => 'bmx-tags' | |
), | |
array( | |
'name' => 'attendees', | |
'post_type' => $tmp_cpt | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment