Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Add new post type for News stories
- function news_stories_init()
- {
- $labels = array(
- 'name' => _x( 'News', 'post type general name' ),
- 'singular_name' => _x( 'News item', 'post type singular name' ),
- 'add_new' => _x( 'Add New', 'news' ), /* menu label to add*/
- 'add_new_item' => __( 'Adding news item' ), /* Heading of the blank add page*/
- 'edit_item' => __( 'Editing news item' ), /* Heading when editing add page*/
- 'new_item' => __( 'New news item' ),
- 'all_items' => __( 'All News Items' ),
- 'view_item' => __( 'View news story' ),
- 'search_items' => __( 'Search News' ),
- 'not_found' => __( 'No news found' ),
- 'not_found_in_trash' => __( 'No news items found in the Trash' ),
- 'parent_item_colon' => '',
- 'menu_name' => 'News'
- );
- $args = array(
- 'label' => __('News'),
- 'labels' => $labels,
- 'description' => 'Holds our news stories',
- 'public' => true,
- 'menu_position' => 5,
- 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments' ),
- 'has_archive' => true,
- );
- register_post_type('news',$args);
- }
- add_action('init', 'news_stories_init');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement