Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Custom post type Applications code by WPGuru.in */
- add_action('init', 'apps_register');
- function apps_register() {
- $labels = array(
- 'name' => _x('Applications', 'post type general name'),
- 'singular_name' => _x('Application', 'post type singular name'),
- 'add_new' => _x('Add New', 'Application'),
- 'add_new_item' => __('Add Application'),
- 'edit_item' => __('Edit Application'),
- 'new_item' => __('New Application'),
- 'view_item' => __('View Application'),
- 'search_items' => __('Search Application'),
- 'not_found' => __('Nothing found'),
- 'not_found_in_trash' => __('Nothing found in Trash'),
- 'parent_item_colon' => ''
- );
- $args = array(
- 'labels' => $labels,
- 'public' => true,
- 'publicly_queryable' => true,
- 'show_ui' => true,
- 'query_var' => true,
- 'menu_icon' => get_stylesheet_directory_uri() . '/article16.png',
- 'rewrite' => true,
- 'capability_type' => 'post',
- 'hierarchical' => false,
- 'menu_position' => null,
- 'supports' => array('')
- );
- register_post_type( 'apps' , $args );
- }
- function apptypes_init() {
- // create a new taxonomy
- register_taxonomy(
- 'apptypes',
- 'apps',
- array(
- 'hierarchical' => true,
- 'label' => __( 'Types' ),
- 'sort' => true,
- 'args' => array( 'orderby' => 'term_order' ),
- 'rewrite' => array( 'slug' => 'types' )
- )
- );
- }
- add_action( 'init', 'apptypes_init' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement