Created
November 11, 2013 13:56
-
-
Save chssweb/7413531 to your computer and use it in GitHub Desktop.
Publications post type
This file contains 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
function register_cpt_publication() { | |
$labels = array( | |
'name' => _x( 'Publications', 'publication' ), | |
'singular_name' => _x( 'Publication', 'publication' ), | |
'add_new' => _x( 'Add New', 'publication' ), | |
'all_items' => _x( 'Publications', 'publication' ), | |
'add_new_item' => _x( 'Add New Publication', 'publication' ), | |
'edit_item' => _x( 'Edit Publication', 'publication' ), | |
'new_item' => _x( 'New Publication', 'publication' ), | |
'view_item' => _x( 'View Publication', 'publication' ), | |
'search_items' => _x( 'Search Publications', 'publication' ), | |
'not_found' => _x( 'No publications found', 'publication' ), | |
'not_found_in_trash' => _x( 'No publications found in Trash', 'publication' ), | |
'parent_item_colon' => _x( 'Parent Publication:', 'publication' ), | |
'menu_name' => _x( 'Publication', 'publication' ), | |
); | |
$args = array( | |
'labels' => $labels, | |
'hierarchical' => true, | |
'description' => 'Publications by the CPRC', | |
'supports' => array( 'title'), | |
'public' => true, | |
'show_ui' => true, | |
'show_in_menu' => true, | |
//'taxonomies' => array('location'), | |
'show_in_nav_menus' => true, | |
'publicly_queryable' => true, | |
'exclude_from_search' => false, | |
'has_archive' => false, | |
'query_var' => true, | |
'can_export' => true, | |
'rewrite' => true, | |
'capability_type' => 'page', | |
'rewrite' => array('slug' => 'publications', 'with_front' => FALSE) | |
); | |
register_post_type( 'publication', $args ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment