<?php
function codex_custom_init() {
$labels = array(
'name' => _x('Specials', 'post type general name'),
'singular_name' => _x('Special', 'post type singular name'),
'add_new' => _x('Add New', 'special'),
'add_new_item' => __('Add New Special'),
'edit_item' => __('Edit Special'),
'new_item' => __('New Special'),
'all_items' => __('All Specials'),
'view_item' => __('View Special'),
'search_items' => __('Search Specials'),
'not_found' => __('No specials found'),
'not_found_in_trash' => __('No specials found in Trash'),
'parent_item_colon' => '',
'menu_name' => __('Specials')
);
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => true,
'capability_type' => 'page',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => null,
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments','page-attributes' )
);
register_post_type('special',$args);
}
add_action( 'init', 'codex_custom_init' );
?>
function codex_custom_init() {
$labels = array(
'name' => _x('Specials', 'post type general name'),
'singular_name' => _x('Special', 'post type singular name'),
'add_new' => _x('Add New', 'special'),
'add_new_item' => __('Add New Special'),
'edit_item' => __('Edit Special'),
'new_item' => __('New Special'),
'all_items' => __('All Specials'),
'view_item' => __('View Special'),
'search_items' => __('Search Specials'),
'not_found' => __('No specials found'),
'not_found_in_trash' => __('No specials found in Trash'),
'parent_item_colon' => '',
'menu_name' => __('Specials')
);
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => true,
'capability_type' => 'page',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => null,
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments','page-attributes' )
);
register_post_type('special',$args);
}
add_action( 'init', 'codex_custom_init' );
?>
No comments:
Post a Comment